mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
correct a flaw with mapto importing.
addImportingAsset was improperly applying cleaning to cleanAssetName rather than leaving it as the raw origional. may or may not want a tighter target there
This commit is contained in:
parent
3733f42618
commit
567e766ffe
1 changed files with 4 additions and 1 deletions
|
|
@ -606,6 +606,7 @@ void AssetImporter::addImportingAssetItem(AssetImportObject* assetItem, AssetImp
|
||||||
AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Path filePath, AssetImportObject* parentItem, String assetNameOverride)
|
AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Path filePath, AssetImportObject* parentItem, String assetNameOverride)
|
||||||
{
|
{
|
||||||
String assetName;
|
String assetName;
|
||||||
|
String origionalName;
|
||||||
|
|
||||||
//In some cases(usually generated assets on import, like materials) we'll want to specifically define the asset name instead of peeled from the filePath
|
//In some cases(usually generated assets on import, like materials) we'll want to specifically define the asset name instead of peeled from the filePath
|
||||||
if (assetNameOverride.isNotEmpty())
|
if (assetNameOverride.isNotEmpty())
|
||||||
|
|
@ -638,6 +639,8 @@ AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Pa
|
||||||
pos = dStrcspn(sanitizedStr, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
|
pos = dStrcspn(sanitizedStr, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
origionalName = assetName;
|
||||||
|
|
||||||
//If we did, indeed, modify the name, update it now
|
//If we did, indeed, modify the name, update it now
|
||||||
if (String(sanitizedStr) != assetName)
|
if (String(sanitizedStr) != assetName)
|
||||||
{
|
{
|
||||||
|
|
@ -648,7 +651,7 @@ AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Pa
|
||||||
assetImportObj->filePath = filePath;
|
assetImportObj->filePath = filePath;
|
||||||
assetImportObj->filePathString = StringTable->insert(filePath.getFullPath().c_str());
|
assetImportObj->filePathString = StringTable->insert(filePath.getFullPath().c_str());
|
||||||
assetImportObj->assetName = assetName;
|
assetImportObj->assetName = assetName;
|
||||||
assetImportObj->cleanAssetName = assetName;
|
assetImportObj->cleanAssetName = origionalName;
|
||||||
assetImportObj->moduleName = targetModuleId;
|
assetImportObj->moduleName = targetModuleId;
|
||||||
assetImportObj->status = "";
|
assetImportObj->status = "";
|
||||||
assetImportObj->statusType = "";
|
assetImportObj->statusType = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue