mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +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
1 changed files with 4 additions and 2 deletions
|
|
@ -2877,11 +2877,12 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
||||||
|
|
||||||
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
||||||
|
String constructorFileName = assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||||
String assetPath = targetPath + "/" + shapeFileName;
|
String assetPath = targetPath + "/" + shapeFileName;
|
||||||
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
String constructorPath = targetPath + "/" + constructorFileName;
|
||||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
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 qualifiedFromFile[2048];
|
||||||
char qualifiedToFile[2048];
|
char qualifiedToFile[2048];
|
||||||
|
|
@ -2896,6 +2897,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
newAsset->setAssetName(assetName);
|
newAsset->setAssetName(assetName);
|
||||||
newAsset->setShapeFile(shapeFileName.c_str());
|
newAsset->setShapeFile(shapeFileName.c_str());
|
||||||
|
newAsset->setShapeConstructorFile(constructorFileName.c_str());
|
||||||
|
|
||||||
AssetImportConfig* cachedConfig = new AssetImportConfig();;
|
AssetImportConfig* cachedConfig = new AssetImportConfig();;
|
||||||
cachedConfig->registerObject();
|
cachedConfig->registerObject();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue