Shift file handling in importer to a standardized function

Added santizing of strings to filenames, object names and asset names for the importer process
Added sanitizeString console function for above
Added processing of terrainBlock object's fields for importer
Added check to avoid updateTSShapeLoadProgress spam
Adjusted folderPrefix logic to walk up directory to find assetName that isn't already in use.
This commit is contained in:
Areloch 2021-08-15 03:07:40 -05:00
parent 190343cbc7
commit 48e994f7bd
5 changed files with 227 additions and 137 deletions

View file

@ -125,7 +125,8 @@ void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32
progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
}
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
if(Con::isFunction("updateTSShapeLoadProgress"))
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
}
//-----------------------------------------------------------------------------
@ -1353,4 +1354,4 @@ DefineEngineFunction( getFormatFilters, const char*, ( ),,
DefineEngineFunction(isSupportedFormat, bool, (const char* extension), , "")
{
return TSShapeLoader::isSupportedFormat(extension);
}
}