Added/Improved some asset type icons

Renamed current default import config to DefaultConfig
Updated Asset Browser UI layout.
Fixed sizing behavior for Edit Asset window
Fixed sizing behavior for Edit Module window
Implemented Collection Sets system
Implemented handling of non-asset loose files for AB
Initial handling logic for prefabs for AB
Updated Asset Importer to hook into C++ AssetImporter
Made Add Module window properly reset module name field when opened
Overhauled entire AB search system so it can use phrases and compound search logic
Overhauled asset previews to utilize single guiIconButtonCtrl for efficiency and stability
Updated Asset Preview Drag-n-drop to work with new previews
Begun initial work with Tags integration into AB - currently only works with datablock categories
Bugin initial work with Creator classes - currently only populates category lists, no items
Added logic for scanning current AB directory for non-asset loose files, and activating an Auto-Import button if any are found
Added ability to drag-n-drop datablocks from AB and spawn requisite object
Stabilized drag-n-drop behavior of ShapeAssets, so when spawned, it'll find a much more sane drop position
Fixed shapeAsset fields for drag-n-drop behavior so it correctly sets field now
Adjusted folder and asset search fields in AB to utilize placeholder text
Added logic when creating new module to prompt auto-populating common default folders
Shifted preview size to slider
Added logic to MenuBuilder so popup menus can utilize bitmap arrays
Added editor setting for if to display loose files in AB
Minor theme color corrections for some profiles
This commit is contained in:
Areloch 2020-07-11 16:49:06 -05:00
parent 67dbe4dfe2
commit 4adcedcf28
42 changed files with 1944 additions and 1160 deletions

View file

@ -15,7 +15,40 @@ function AssetBrowser::CreateNewModule(%this)
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadDirectories();";
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.promptNewModuleFolders();";
}
function AssetBrowser::promptNewModuleFolders(%this)
{
MessageBoxYesNo("Create Folders?",
"Do you want to create some common folders for organization of your new Module?",
"AssetBrowser.makeModuleFolders();", //if yes, make the foldesr
"AssetBrowser.loadDirectories();"); //if no, just refresh
}
function AssetBrowser::makeModuleFolders(%this)
{
%moduleId = AssetBrowser.newModuleId;
%moduleDef = ModuleDatabase.findModule(%moduleId);
%modulePath = %moduleDef.ModulePath;
%count = 0;
%defaultModuleFolders[%count++] = "datablocks";
%defaultModuleFolders[%count++] = "terrains";
%defaultModuleFolders[%count++] = "postFXs";
%defaultModuleFolders[%count++] = "levels";
%defaultModuleFolders[%count++] = "shapes";
%defaultModuleFolders[%count++] = "guis";
%defaultModuleFolders[%count++] = "scripts";
%defaultModuleFolders[%count++] = "scripts/client";
%defaultModuleFolders[%count++] = "scripts/server";
for(%i=0; %i <= %count; %i++)
{
%this.dirHandler.createFolder(%modulePath @ "/" @ %defaultModuleFolders[%i]);
}
AssetBrowser.loadDirectories();
}
function AssetBrowser::createNewEditorTool(%this)