Updated TSStatic to utilize the getShapeAsset utility functions, and shifted the loader logic to utilize ShapeAssets exclusively, having straight file names go through the utility function to find/process a relevent asset.

This commit is contained in:
Areloch 2020-03-21 00:36:49 -05:00
parent 6ade6f08ce
commit 7029024b8e
5 changed files with 127 additions and 141 deletions

View file

@ -300,6 +300,7 @@ bool ShapeAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr<ShapeAss
//If possible, see if we can run an in-place import and the get the asset from that
#if TORQUE_DEBUG
Con::warnf("ShapeAsset::getAssetByFilename - Attempted to in-place import a shapefile(%s) that had no associated asset", fileName);
#endif
ConsoleValueRef result = Con::executef("importLooseFile", fileName, true);
@ -315,7 +316,6 @@ bool ShapeAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr<ShapeAss
return true;
}
}
#endif
//Didn't work, so have us fall back to a placeholder asset
shapeAsset->setAssetId(StringTable->insert("Core_Rendering:noshape"));