Unreal/CarlaUE4/Plugins/RoadRunnerImporter/Source/RoadRunnerImporter/Private/RoadRunnerReimportFactory.cpp
////////////////////////////////////////////////////////////////////////////////
// Allow re-import if metadata exists
Allow re-import if metadata exists
Allow re - import if metadata exists
bool URoadRunnerReimportFactory::CanReimport(UObject * obj, TArray<FString>& outFilenames)
{
	UFbxSceneImportData* sceneImportData = nullptr;
	if (obj->IsA(UFbxSceneImportData::StaticClass()))
	{
		sceneImportData = Cast<UFbxSceneImportData>(obj);
	}
	if (!sceneImportData)
		return false;
	FString rrMetadataFile = FPaths::ChangeExtension(sceneImportData->SourceFbxFile, ".rrdata.xml");
	if (!FPaths::FileExists(rrMetadataFile))
	{
		return false;
	}
	outFilenames.Add(sceneImportData->SourceFbxFile);
	return true;
}
bool URoadRunnerReimportFactory :: CanReimport ( UObject * obj , TArray < FString > & outFilenames ) { UFbxSceneImportData * sceneImportData = nullptr ; if ( obj -> IsA ( UFbxSceneImportData :: StaticClass ( ) ) ) { sceneImportData = Cast < UFbxSceneImportData > ( obj ) ; } if ( ! sceneImportData ) return false ; FString rrMetadataFile = FPaths :: ChangeExtension ( sceneImportData -> SourceFbxFile , " " ) ; if ( ! FPaths :: FileExists ( rrMetadataFile ) ) { return false ; } outFilenames . Add ( sceneImportData -> SourceFbxFile ) ; return true ; }
Allow re-import if metadata exists
Allow re - import if metadata exists
//Reimport from the scene data // Search for metadata file at original import location