mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
misc asset pipeline cleanups
AssetImporter::validateAsset make sure the modelDef looked for is valid AssetImporter::importShapeAsset had a stray +"_"+embeded in it when it came to stitching togeather filenames and extentions
This commit is contained in:
parent
5534384c54
commit
f95a78d2e8
1 changed files with 2 additions and 2 deletions
|
|
@ -2065,7 +2065,7 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
ModuleDefinition* moduleDef = AssetDatabase.getAssetModuleDefinition(assetId);
|
ModuleDefinition* moduleDef = AssetDatabase.getAssetModuleDefinition(assetId);
|
||||||
|
|
||||||
if (moduleDef->getModuleId() != StringTable->insert(targetModuleId.c_str()))
|
if ((moduleDef == NULL) || moduleDef->getModuleId() != StringTable->insert(targetModuleId.c_str()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StringTableEntry assetName = AssetDatabase.getAssetName(assetId);
|
StringTableEntry assetName = AssetDatabase.getAssetName(assetId);
|
||||||
|
|
@ -2982,7 +2982,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
{
|
{
|
||||||
constructor = new TSShapeConstructor(qualifiedToFile);
|
constructor = new TSShapeConstructor(qualifiedToFile);
|
||||||
|
|
||||||
String constructorName = assetItem->filePath.getFileName() + "_" + assetItem->filePath.getExtension().substr(0, 3);
|
String constructorName = assetItem->filePath.getFileName() + assetItem->filePath.getExtension().substr(0, 3);
|
||||||
constructorName.replace(" ", "_");
|
constructorName.replace(" ", "_");
|
||||||
constructorName.replace("-", "_");
|
constructorName.replace("-", "_");
|
||||||
constructorName.replace(".", "_");
|
constructorName.replace(".", "_");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue