mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 13:55:34 +00:00
Removed duplicate checkbox image
Added asset import conflict resolution option to prepend folder name Cleanups of Project Importer and fixed importing of material and terrain materials, specifically, fallbacks in the event they are unnamed to utilize the mapTo and internalName fields, respectively Fixed typos in guiTerrainMaterialDlg Added AssetBrowser button to GuiEditor Improved FileObject's PeekLine function to be able to peek forward further via an optional lineOffset argument
This commit is contained in:
parent
438e6cbb3c
commit
abf5a09bc3
12 changed files with 298 additions and 194 deletions
|
|
@ -132,7 +132,7 @@ void AssetImportConfig::initPersistFields()
|
|||
Parent::initPersistFields();
|
||||
|
||||
addGroup("General");
|
||||
addField("DuplicatAutoResolution", TypeRealString, Offset(DuplicatAutoResolution, AssetImportConfig), "Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename");
|
||||
addField("DuplicatAutoResolution", TypeRealString, Offset(DuplicatAutoResolution, AssetImportConfig), "Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename, FolderPrefix");
|
||||
addField("WarningsAsErrors", TypeBool, Offset(WarningsAsErrors, AssetImportConfig), "Indicates if warnings should be treated as errors");
|
||||
addField("PreventImportWithErrors", TypeBool, Offset(PreventImportWithErrors, AssetImportConfig), "Indicates if importing should be prevented from completing if any errors are detected at all");
|
||||
addField("AutomaticallyPromptMissingFiles", TypeBool, Offset(AutomaticallyPromptMissingFiles, AssetImportConfig), "Should the importer automatically prompt to find missing files if they are not detected automatically by the importer");
|
||||
|
|
@ -2379,6 +2379,27 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
|
|||
{
|
||||
|
||||
}
|
||||
else if (activeImportConfig->DuplicatAutoResolution == String("FolderPrefix"))
|
||||
{
|
||||
//Set trailing number
|
||||
String renamedAssetName = assetItem->assetName;
|
||||
String owningFolder = assetItem->filePath.getDirectory(assetItem->filePath.getDirectoryCount() - 1);
|
||||
|
||||
renamedAssetName = owningFolder + "_" + renamedAssetName;
|
||||
|
||||
//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());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed to %s", assetItem->assetName.c_str(), renamedAssetName.c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
||||
assetItem->assetName = renamedAssetName;
|
||||
|
||||
//Whatever status we had prior is no longer relevent, so reset the status
|
||||
resetAssetValidationStatus(assetItem);
|
||||
importIssues = false;
|
||||
}
|
||||
}
|
||||
else if (assetItem->statusType == String("MissingFile"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue