mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 22:05:40 +00:00
Merge branch 'Preview4_0_DevHead' into tsneo
This commit is contained in:
commit
ada1c5a021
521 changed files with 259 additions and 162 deletions
|
|
@ -2381,11 +2381,25 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
|
|||
}
|
||||
else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix"))
|
||||
{
|
||||
//Set trailing number
|
||||
String renamedAssetName = assetItem->assetName;
|
||||
String owningFolder = assetItem->filePath.getDirectory(assetItem->filePath.getDirectoryCount() - 1);
|
||||
|
||||
renamedAssetName = owningFolder + "_" + renamedAssetName;
|
||||
//Set trailing number
|
||||
S32 dirIndex = assetItem->filePath.getDirectoryCount() - 1;
|
||||
while (dirIndex > -1)
|
||||
{
|
||||
renamedAssetName = assetItem->assetName;
|
||||
String owningFolder = assetItem->filePath.getDirectory(dirIndex);
|
||||
|
||||
renamedAssetName = owningFolder + "_" + renamedAssetName;
|
||||
|
||||
if (AssetDatabase.isDeclaredAsset(renamedAssetName))
|
||||
{
|
||||
dirIndex--;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//Log it's renaming
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue