mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Added logic to correctly associate constructor script file for shape asset to asset as an assetfile
This commit is contained in:
parent
87bd7bbeae
commit
9a10d52e0b
|
|
@ -2877,11 +2877,12 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
||||
|
||||
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
||||
String constructorFileName = assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||
String assetPath = targetPath + "/" + shapeFileName;
|
||||
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||
String constructorPath = targetPath + "/" + constructorFileName;
|
||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
||||
String originalConstructorPath = assetItem->filePath.getPath() + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||
String originalConstructorPath = assetItem->filePath.getPath() + "/" + constructorFileName;
|
||||
|
||||
char qualifiedFromFile[2048];
|
||||
char qualifiedToFile[2048];
|
||||
|
|
@ -2896,6 +2897,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
|
||||
newAsset->setAssetName(assetName);
|
||||
newAsset->setShapeFile(shapeFileName.c_str());
|
||||
newAsset->setShapeConstructorFile(constructorFileName.c_str());
|
||||
|
||||
AssetImportConfig* cachedConfig = new AssetImportConfig();;
|
||||
cachedConfig->registerObject();
|
||||
|
|
|
|||
Loading…
Reference in a new issue