Removes extra assetImportConfigs file

Fixes name handling when finding associated image files on materials
Makes parseImageSuffix return back the case-correct suffix given the image's filename
Fixes import session reset logic to not have infinite looping happen when activated if files are in the session still(used mainly when import config is changed)
Makes sure materials are not processed if they are found in the import config's ignoreMaterials list
Makes sure active import config is properly on importer when it's changed in the Import window
Tweaked asset browser folder filtering logic so it always rejects .git folders from displaying, and also made the core, tools, cache and shaderCache filtering behavior consistent
Fixed navigation of root-level folders if double-clicking on them through the main window
Ensured import session is reset after an import happens so no extra files are left over in the importer's list
This commit is contained in:
Areloch 2020-08-08 13:01:50 -05:00
parent 6153d3c27b
commit d01341708e
9 changed files with 271 additions and 149 deletions

View file

@ -1492,6 +1492,15 @@ function AssetBrowser::doRebuildAssetArray(%this)
else
{
//got it.
if(%folderName $= "shaderCache" || %folderName $= "cache" || %folderName $= ".git")
continue;
if(!%this.coreModulesFilter && %folderName $= "core" && %breadcrumbPath $= "")
continue;
if(!%this.toolsModulesFilter && %folderName $= "tools" && %breadcrumbPath $= "")
continue;
%assetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
}
}
@ -1856,6 +1865,10 @@ function AssetBrowserAssetSearchBtn::onClick( %this )
// Navigation
function AssetBrowser::navigateTo(%this, %address, %historyNav)
{
//Sanitize
if(startsWith(%address, "/"))
%address = strreplace(%address, "/", "");
//Don't bother navigating if it's to the place we already are
if(AssetBrowser.dirHandler.currentAddress !$= %address)
{

View file

@ -686,6 +686,7 @@ function ImportAssetWindow::doRefresh(%this)
//Go ahead and check if we have any issues, and if not, run the import!
ImportAssetWindow.importer.ImportAssets();
ImportAssetWindow.importer.resetImportSession(true);
}
else
{

View file

@ -12,10 +12,11 @@ function ImportAssetConfigList::onSelect( %this, %id, %text )
ImportAssetWindow.activeImportConfigIndex = %id;
//ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
if(!isObject(%this.activeImporConfig))
%this.activeImporConfig = new AssetImportConfig();
if(!isObject(ImportAssetWindow.activeImportConfig))
ImportAssetWindow.activeImportConfig = new AssetImportConfig();
%this.activeImporConfig.loadImportConfig(AssetImportSettings, ImportAssetWindow.importConfigsList.getKey(%id));
ImportAssetWindow.activeImportConfig.loadImportConfig(AssetImportSettings, ImportAssetWindow.importConfigsList.getKey(%id));
ImportAssetWindow.importer.setImportConfig(ImportAssetWindow.activeImportConfig);
//If we were trying to import anything, refresh it with the new config
ImportAssetWindow.importer.resetImportSession();

View file

@ -39,6 +39,9 @@ function directoryHandler::loadFolders(%this, %path, %parentId)
//we don't need to display the shadercache folder
if(%parentName $= "Data" && (%folderName $= "shaderCache" || %folderName $= "cache"))
continue;
if(%folderName $= ".git")
continue;
%iconIdx = 3;