2018-01-28 15:30:17 -06:00
|
|
|
function AssetBrowser::buildPopupMenus(%this)
|
|
|
|
|
{
|
|
|
|
|
if( !isObject( AddNewModulePopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( AddNewModulePopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Create New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
|
|
|
|
|
item[ 1 ] = "Refresh Module Dependencies" TAB "" TAB "AssetBrowser.RefreshModuleDependencies();";
|
|
|
|
|
};
|
2019-10-06 01:29:12 -05:00
|
|
|
|
|
|
|
|
AddNewModulePopup.enableItem(1, false);
|
2018-01-28 15:30:17 -06:00
|
|
|
}
|
2019-11-06 00:23:07 -06:00
|
|
|
|
2018-01-28 15:30:17 -06:00
|
|
|
if( !isObject( EditAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Edit Asset" TAB "" TAB "AssetBrowser.editAsset();";
|
|
|
|
|
item[ 1 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
|
2021-11-14 01:26:04 -06:00
|
|
|
item[ 2 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
2018-01-28 15:30:17 -06:00
|
|
|
item[ 3 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
|
|
|
|
|
item[ 4 ] = "-";
|
2022-04-03 20:00:30 -05:00
|
|
|
item[ 5 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
2018-01-28 15:30:17 -06:00
|
|
|
item[ 6 ] = "-";
|
2022-04-03 20:00:30 -05:00
|
|
|
item[ 7 ] = "Regenerate Preview Image" TAB "" TAB "AssetBrowser.regeneratePreviewImage();";
|
2018-01-28 15:30:17 -06:00
|
|
|
item[ 8 ] = "-";
|
2022-04-03 20:00:30 -05:00
|
|
|
item[ 9 ] = "Re-Import Asset" TAB "" TAB "AssetBrowser.reImportAsset();";
|
|
|
|
|
item[ 10 ] = "-";
|
2022-04-06 01:08:20 -05:00
|
|
|
item[ 11 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
|
|
|
|
|
item[ 12 ] = "-";
|
|
|
|
|
item[ 13 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
|
2018-01-28 15:30:17 -06:00
|
|
|
|
|
|
|
|
jumpFileName = "";
|
|
|
|
|
jumpLineNumber = "";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-25 07:40:10 -05:00
|
|
|
if( !isObject( RestoreBackupListPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( RestoreBackupListPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
radioSelection = false;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-04 11:49:42 -05:00
|
|
|
if( !isObject( EditLevelAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditLevelAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Edit Level" TAB "" TAB "AssetBrowser.editAsset();";
|
|
|
|
|
item[ 1 ] = "Append as Sublevel" TAB "" TAB "AssetBrowser.appendSublevel();";
|
|
|
|
|
item[ 2 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
|
2021-11-14 01:26:04 -06:00
|
|
|
item[ 3 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
2019-05-04 11:49:42 -05:00
|
|
|
item[ 4 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
|
|
|
|
|
item[ 5 ] = "-";
|
|
|
|
|
Item[ 6 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
|
|
|
|
item[ 7 ] = "-";
|
2025-05-25 07:40:10 -05:00
|
|
|
Item[ 8 ] = "Restore Backup" TAB RestoreBackupListPopup;
|
2022-04-06 01:08:20 -05:00
|
|
|
item[ 9 ] = "-";
|
2025-05-25 07:40:10 -05:00
|
|
|
item[ 10 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
|
|
|
|
|
item[ 11 ] = "-";
|
|
|
|
|
item[ 12 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
|
2019-05-04 11:49:42 -05:00
|
|
|
|
|
|
|
|
jumpFileName = "";
|
|
|
|
|
jumpLineNumber = "";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-28 23:43:56 -06:00
|
|
|
if( !isObject( EditTerrainAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditTerrainAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Export Terraform Data" TAB "" TAB "Heightfield::saveBitmap(\"\");";
|
|
|
|
|
item[ 1 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
|
|
|
|
|
item[ 2 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
|
|
|
|
|
item[ 3 ] = "-";
|
|
|
|
|
Item[ 4 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
|
|
|
|
item[ 5 ] = "-";
|
2025-05-25 07:40:10 -05:00
|
|
|
Item[ 6 ] = "Restore Backup" TAB RestoreBackupListPopup;
|
2022-04-06 01:08:20 -05:00
|
|
|
item[ 7 ] = "-";
|
2025-05-25 07:40:10 -05:00
|
|
|
item[ 8 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
|
|
|
|
|
item[ 9 ] = "-";
|
|
|
|
|
item[ 10 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
|
2020-12-28 23:43:56 -06:00
|
|
|
|
|
|
|
|
jumpFileName = "";
|
|
|
|
|
jumpLineNumber = "";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-28 15:30:17 -06:00
|
|
|
if( !isObject( AddNewComponentAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( AddNewComponentAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
//item[ 0 ] = "Create Component" TAB "" TAB "Canvas.pushDialog(AssetBrowser_newComponentAsset); AssetBrowser_newComponentAsset-->NewComponentPackageList.setText(AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 0 ] = "Component" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ComponentAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
|
|
|
|
|
//list other common component types here to shortcut the creation process
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( !isObject( AddNewScriptAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
%this.AddNewScriptAssetPopup = new PopupMenu( AddNewScriptAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
2020-07-11 16:49:06 -05:00
|
|
|
//item[ 0 ] = "Create Component" TAB AddNewComponentAssetPopup;
|
|
|
|
|
item[ 0 ] = "Create Script" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ScriptAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 1 ] = "Create State Machine" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"StateMachineAsset\", AssetBrowser.selectedModule);";
|
2024-09-01 16:39:00 -05:00
|
|
|
item[ 2 ] = "-";
|
2025-06-17 19:08:45 -05:00
|
|
|
item[ 3 ] = "Create Game Mode" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GameModeType\", AssetBrowser.selectedModule);";
|
2018-01-28 15:30:17 -06:00
|
|
|
//item[ 3 ] = "Create Game Object" TAB "" TAB "AssetBrowser.createNewGameObjectAsset(\"NewGameObject\", AssetBrowser.selectedModule);";
|
|
|
|
|
};
|
|
|
|
|
//%this.AddNewScriptAssetPopup.insertSubMenu(0, "Create Component", AddNewComponentAssetPopup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( !isObject( AddNewArtAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
%this.AddNewArtAssetPopup = new PopupMenu( AddNewArtAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
2019-12-23 12:37:55 -06:00
|
|
|
item[ 0 ] = "Create Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"MaterialAsset\", AssetBrowser.selectedModule);";//"createNewMaterialAsset(\"NewMaterial\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 1 ] = "Create Terrain Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainMaterialAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 2 ] = "Create Image" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ImageAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
|
2019-11-06 00:23:07 -06:00
|
|
|
item[ 3 ] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[ 4 ] = "Create Terrain Data" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule);";
|
2019-11-06 00:23:07 -06:00
|
|
|
item[ 5 ] = "-";
|
2022-08-26 15:25:17 -05:00
|
|
|
item[ 6 ] = "Create GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 7 ] = "-";
|
|
|
|
|
item[ 8 ] = "Create Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
|
2018-01-28 15:30:17 -06:00
|
|
|
};
|
|
|
|
|
}
|
2019-05-04 11:49:42 -05:00
|
|
|
|
|
|
|
|
if( !isObject( AddNewCppAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
%this.AddNewCppAssetPopup = new PopupMenu( AddNewCppAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
2021-01-02 01:58:15 -06:00
|
|
|
item[ 0 ] = "Create Static C++ Class" TAB "" TAB "$AssetBrowser::newAssetTypeOverride = \"StaticClass\"; AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 1 ] = "Create ScriptObject C++ Class" TAB "" TAB "$AssetBrowser::newAssetTypeOverride = \"ScriptClass\"; AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 2 ] = "Create AssetType C++ Class" TAB "" TAB "$AssetBrowser::newAssetTypeOverride = \"AssetTypeCppClass\"; AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 3 ] = "Create Render C++ Class" TAB "" TAB "$AssetBrowser::newAssetTypeOverride = \"RenderCppClass\"; AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
|
|
|
|
|
item[ 3 ] = "Create SceneObject Class" TAB "" TAB "$AssetBrowser::newAssetTypeOverride = \"SceneObjectCppClass\"; AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
|
2019-05-04 11:49:42 -05:00
|
|
|
};
|
|
|
|
|
//%this.AddNewScriptAssetPopup.insertSubMenu(0, "Create Component", AddNewComponentAssetPopup);
|
|
|
|
|
}
|
2018-01-28 15:30:17 -06:00
|
|
|
|
|
|
|
|
if( !isObject( AddNewAssetPopup ) )
|
|
|
|
|
{
|
|
|
|
|
%this.AddNewAssetPopup = new PopupMenu( AddNewAssetPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
|
2019-12-23 12:37:55 -06:00
|
|
|
item[0] = "Create Folder" TAB "" TAB "AssetBrowser.CreateNewFolder();";
|
2018-01-28 15:30:17 -06:00
|
|
|
item[1] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[2] = "Create Code Asset" TAB AddNewScriptAssetPopup;
|
2018-01-28 15:30:17 -06:00
|
|
|
item[3] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[4] = "Create Art Asset" TAB AddNewArtAssetPopup;
|
2019-05-04 11:49:42 -05:00
|
|
|
item[5] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[6] = "Create Level" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewLevelAsset(\"NewLevel\", AssetBrowser.selectedModule);";
|
2019-10-06 01:29:12 -05:00
|
|
|
item[7] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[8] = "Create C++ Asset" TAB AddNewCppAssetPopup;
|
2019-10-20 02:47:15 -05:00
|
|
|
item[9] = "-";
|
2019-12-23 12:37:55 -06:00
|
|
|
item[10] = "Create New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
|
2020-02-17 00:32:50 -06:00
|
|
|
item[11] = "-";
|
2022-04-03 20:00:30 -05:00
|
|
|
item[12] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
|
2022-04-06 01:08:20 -05:00
|
|
|
Item[ 13 ] = "-";
|
|
|
|
|
item[ 14 ] = "Open Folder Location" TAB "" TAB "AssetBrowser.openFolderLocation();";
|
2018-01-28 15:30:17 -06:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( !isObject( EditModulePopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditModulePopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
2019-11-24 06:52:34 -06:00
|
|
|
item[ 0 ] = "New Asset" TAB AddNewAssetPopup;
|
2018-01-28 15:30:17 -06:00
|
|
|
item[ 1 ] = "Reload Module" TAB "" TAB "AssetBrowser.reloadModule();";
|
2020-03-19 09:47:38 -05:00
|
|
|
Item[ 2 ] = "Edit Module" TAB "" TAB "AssetBrowser.editModuleScript();";
|
|
|
|
|
Item[ 3 ] = "-";
|
|
|
|
|
Item[ 4 ] = "Module Properties" TAB "" TAB "AssetBrowser.editModuleInfo();";
|
|
|
|
|
Item[ 5 ] = "-";
|
2022-04-06 01:08:20 -05:00
|
|
|
item[ 6 ] = "Open Folder Location" TAB "" TAB "AssetBrowser.openFolderLocation();";
|
|
|
|
|
item[ 7 ] = "-";
|
|
|
|
|
Item[ 8 ] = "Duplicate Module" TAB "" TAB "AssetBrowser.copyModule();";
|
|
|
|
|
Item[ 9 ] = "-";
|
|
|
|
|
Item[ 10 ] = "Delete Module" TAB "" TAB "AssetBrowser.deleteModule();";
|
|
|
|
|
item[ 11 ] = "-";
|
2022-05-25 00:12:12 -05:00
|
|
|
item[ 12 ] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
|
2018-01-28 15:30:17 -06:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
|
|
|
if( !isObject( EditNonModulePopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditNonModulePopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Turn Folder into Module" TAB "" TAB "AssetBrowser.ConvertFolderIntoModule();";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-06 00:23:07 -06:00
|
|
|
if( !isObject( EditFolderPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditFolderPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
2019-11-24 06:52:34 -06:00
|
|
|
Item[ 0 ] = "Create" TAB AddNewAssetPopup;
|
2019-11-06 00:23:07 -06:00
|
|
|
item[ 1 ] = "-";
|
|
|
|
|
item[ 2 ] = "Rename Folder" TAB "" TAB "AssetBrowser.renameAsset();";
|
|
|
|
|
Item[ 3 ] = "Duplicate Folder" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
|
|
|
|
item[ 4 ] = "-";
|
|
|
|
|
item[ 5 ] = "Delete Folder" TAB "" TAB "AssetBrowser.deleteAsset();";
|
2020-02-17 00:32:50 -06:00
|
|
|
item[ 6 ] = "-";
|
2022-05-25 00:12:12 -05:00
|
|
|
item[ 7 ] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
|
2019-11-06 00:23:07 -06:00
|
|
|
};
|
|
|
|
|
}
|
2018-01-28 15:30:17 -06:00
|
|
|
|
2019-05-04 11:49:42 -05:00
|
|
|
if( !isObject( EditAssetCategoryPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditAssetCategoryPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Toggle Autoloading of Script Assets" TAB "" TAB "AssetBrowser.toggleAutoloadAsset(\"Script\");";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-20 02:47:15 -05:00
|
|
|
if( !isObject( AssetTypeListPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( AssetTypeListPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
2019-11-24 06:52:34 -06:00
|
|
|
|
|
|
|
|
radioSelection = false;
|
2019-10-20 02:47:15 -05:00
|
|
|
};
|
|
|
|
|
|
2024-09-28 16:09:56 -05:00
|
|
|
AssetTypeListPopup.addItem(0, "All" TAB "" TAB %this @ ".toggleAssetTypeFilter(0);");
|
2019-11-24 06:52:34 -06:00
|
|
|
AssetTypeListPopup.addItem(1, "-");
|
|
|
|
|
|
2024-09-28 16:09:56 -05:00
|
|
|
%listIndex = 1;
|
|
|
|
|
for(%i=0; %i < ABAssetTypesList.Count(); %i++)
|
2019-10-20 02:47:15 -05:00
|
|
|
{
|
2024-09-28 16:09:56 -05:00
|
|
|
%assetTypeData = ABAssetTypesList.getValue(%i);
|
|
|
|
|
if(getField(%assetTypeData, 3) != true)
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
AssetTypeListPopup.addItem(%listIndex, getField(%assetTypeData,1) TAB "" TAB %this @ ".toggleAssetTypeFilter(" @ %listIndex @ ");");
|
|
|
|
|
%listIndex++;
|
2019-11-24 06:52:34 -06:00
|
|
|
}
|
2019-10-20 02:47:15 -05:00
|
|
|
}
|
|
|
|
|
|
2019-05-04 11:49:42 -05:00
|
|
|
//Browser visibility menu
|
|
|
|
|
if( !isObject( BrowserVisibilityPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( BrowserVisibilityPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Toggle Show Core Modules" TAB "" TAB "AssetBrowser.viewCoreModulesFilter();";
|
2019-10-20 02:47:15 -05:00
|
|
|
item[ 1 ] = "Toggle Show Tools Modules" TAB "" TAB "AssetBrowser.viewToolsModulesFilter();";
|
|
|
|
|
item[ 2 ] = "Toggle Only Show Modules with Assets" TAB "" TAB "AssetBrowser.viewPopulatedModulesFilter();";
|
|
|
|
|
Item[ 3 ] = "-";
|
|
|
|
|
item[ 4 ] = "Show Folders" TAB "" TAB "AssetBrowser.toggleShowingFolders();";
|
|
|
|
|
item[ 5 ] = "Show Empty Folders" TAB "" TAB "AssetBrowser.toggleShowingEmptyFolders();";
|
|
|
|
|
item[ 6 ] = "-";
|
|
|
|
|
item[ 7 ] = "Filter by Asset Type" TAB AssetTypeListPopup;
|
|
|
|
|
item[ 8 ] = "-";
|
|
|
|
|
item[ 9 ] = "Enable Auto-refresh" TAB "" TAB "AssetBrowser.toggleAutorefresh();";
|
2019-05-04 11:49:42 -05:00
|
|
|
};
|
2019-10-20 02:47:15 -05:00
|
|
|
|
|
|
|
|
BrowserVisibilityPopup.enableItem(5, false);
|
|
|
|
|
BrowserVisibilityPopup.enableItem(9, false);
|
2019-05-04 11:49:42 -05:00
|
|
|
}
|
|
|
|
|
|
2019-10-20 02:47:15 -05:00
|
|
|
//
|
|
|
|
|
|
2019-05-04 11:49:42 -05:00
|
|
|
//Import Legacy menus
|
|
|
|
|
if( !isObject( ImportAssetsPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( ImportAssetsPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
|
2022-05-25 00:12:12 -05:00
|
|
|
item[ 1 ] = "Import new assets" TAB "" TAB "Canvas.pushDialog(AssetImportCtrl);";
|
2019-05-04 11:49:42 -05:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-03 00:09:18 -06:00
|
|
|
//
|
2020-01-09 18:28:53 -06:00
|
|
|
// Import Asset Actions
|
2019-12-03 00:09:18 -06:00
|
|
|
//
|
2020-01-09 18:28:53 -06:00
|
|
|
if( !isObject( ImportAssetMaterialMaps ) )
|
|
|
|
|
{
|
|
|
|
|
%this.ImportAssetActions = new PopupMenu( ImportAssetMaterialMaps )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
|
|
|
|
|
item[0] = "Add Color Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Color\");";
|
|
|
|
|
item[1] = "Add Normal Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Normal\");";
|
|
|
|
|
item[2] = "Add Composite Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Composite\");";
|
|
|
|
|
item[3] = "Add Metalness Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Metalness\");";
|
|
|
|
|
item[4] = "Add AO Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"AO\");";
|
|
|
|
|
item[5] = "Add Roughness Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Roughness\");";
|
|
|
|
|
item[6] = "Add Glow Map" TAB "" TAB "ImportAssetWindow.addMaterialMap(\"Glow\");";
|
|
|
|
|
Item[7] = "-";
|
|
|
|
|
Item[8] = "Add Existing Image Asset" TAB "" TAB "ImportAssetWindow.addExistingImageAsset();";
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-03 00:09:18 -06:00
|
|
|
if( !isObject( ImportAssetActions ) )
|
|
|
|
|
{
|
|
|
|
|
%this.ImportAssetActions = new PopupMenu( ImportAssetActions )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
|
2020-01-09 18:28:53 -06:00
|
|
|
item[0] = "Add New Asset" TAB "" TAB "ImportAssetWindow.addNewImportingAsset();";
|
Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
|
|
|
item[1] = "Import Existing File as Asset" TAB "" TAB "ImportAssetWindow.importExistingFile();";
|
|
|
|
|
item[2] = "-";
|
|
|
|
|
item[3] = "Add Reference to Existing Asset" TAB "" TAB "ImportAssetWindow.addRefExistingAsset();";
|
|
|
|
|
item[4] = "-";
|
|
|
|
|
item[5] = "Remove asset" TAB "" TAB "ImportAssetWindow.removeImportingAsset();";
|
2019-12-03 00:09:18 -06:00
|
|
|
};
|
|
|
|
|
}
|
Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
|
|
|
|
|
|
|
|
if( !isObject( AddNewToolPopup ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( AddNewToolPopup )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Create New Editor Tool" TAB "" TAB "AssetBrowser.createNewEditorTool(AddNewToolPopup.targetFolder);";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
AddNewModulePopup.enableItem(1, false);
|
|
|
|
|
}
|
2020-07-11 16:49:06 -05:00
|
|
|
|
|
|
|
|
if( !isObject( EditCollectionSets ) )
|
|
|
|
|
{
|
|
|
|
|
new PopupMenu( EditCollectionSets )
|
|
|
|
|
{
|
|
|
|
|
superClass = "MenuBuilder";
|
|
|
|
|
class = "EditorWorldMenu";
|
|
|
|
|
//isPopup = true;
|
|
|
|
|
|
|
|
|
|
item[ 0 ] = "Delete Collection Set" TAB "" TAB "AssetBrowser.deleteCollectionSet();";
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-01-28 15:30:17 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
function AddNewScriptAssetPopupMenu::setupDefaultState(%this)
|
|
|
|
|
{
|
|
|
|
|
// Setup camera speed gui's. Both menu and editorgui
|
|
|
|
|
%this.setupGuiControls();
|
|
|
|
|
|
|
|
|
|
Parent::setupDefaultState(%this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function AddNewScriptAssetPopupMenu::setupGuiControls(%this)
|
|
|
|
|
{
|
|
|
|
|
}
|
2025-05-25 07:40:10 -05:00
|
|
|
|
|
|
|
|
function RestoreBackupListPopup::populateList(%this, %assetId)
|
|
|
|
|
{
|
|
|
|
|
//process it and then check if we have any autosave backups
|
|
|
|
|
%processedId = strReplace(%assetId, ":", "_");
|
|
|
|
|
%autosavePath = "tools/autosave/" @ %processedId @ "/";
|
|
|
|
|
|
|
|
|
|
RestoreBackupListPopup.clearItems();
|
|
|
|
|
|
|
|
|
|
if(isDirectory(%autosavePath))
|
|
|
|
|
{
|
|
|
|
|
%dirs = getDirectoryList(%autosavePath);
|
|
|
|
|
%count = getFieldCount(%dirs);
|
|
|
|
|
|
|
|
|
|
if(%count > 0)
|
|
|
|
|
{
|
|
|
|
|
%saveArray = new ArrayObject(){};
|
|
|
|
|
//loop over the entries and find the oldest one
|
|
|
|
|
for(%f=0; %f < %count; %f++)
|
|
|
|
|
{
|
|
|
|
|
%saveArray.add(getField(%dirs, %f));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%saveArray.sortk();
|
|
|
|
|
|
|
|
|
|
for(%i=0; %i < %count; %i++)
|
|
|
|
|
{
|
|
|
|
|
%folderName = %saveArray.getKey(%i);
|
|
|
|
|
%labelText = %folderName @ " (" @ fileModifiedTime(%autosavePath @ %folderName) @ ")";
|
|
|
|
|
RestoreBackupListPopup.addItem(%i, %labelText TAB "" TAB "AssetBrowser.restoreAssetBackup(\"" @ %assetId @ "\"," @ %i @ ");");
|
|
|
|
|
|
|
|
|
|
echo("Added restore item: " @ %labelText TAB "" TAB "AssetBrowser.restoreAssetBackup(\"" @ %assetId @ "\"," @ %i @ ");");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%saveArray.delete();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|