Torque3D/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.tscript

455 lines
18 KiB
Text
Raw Normal View History

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();";
};
AddNewModulePopup.enableItem(1, false);
}
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();";
item[ 2 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
item[ 3 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
item[ 4 ] = "-";
Removed unneeded default irradiance and prefilter cubemaps, and their convars Added getGUIPath console function to guiAsset Corrected console function documentation for getScriptPath in MaterialAsset Added getter console functions to PostEffectAsset Added getAnimationPath console function to PostEffectAsset Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az) Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az) Fixed duplicate naming of quality levels on LightingQualityList Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu Improves check for unapplied graphics options on options menu and applies them all at once Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic Adds better tracking of what options menu category is shown so refreshes don't reset it Add better handling for changing resolution in options menu and getting it to apply properly Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript Removed unneeded extra logging from asset browser drag-n-drop actions Adds item to RMB context menu in AB to regenerate preview images Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1. Temporarily disables fields and handling of 'open in Torsion'. Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes Adds proper loading of roughness and metalness fields in material editor Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else Adds check to avoid spam of markItem errors in the event requested tree item is invalid Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
item[ 5 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
item[ 6 ] = "-";
Removed unneeded default irradiance and prefilter cubemaps, and their convars Added getGUIPath console function to guiAsset Corrected console function documentation for getScriptPath in MaterialAsset Added getter console functions to PostEffectAsset Added getAnimationPath console function to PostEffectAsset Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az) Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az) Fixed duplicate naming of quality levels on LightingQualityList Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu Improves check for unapplied graphics options on options menu and applies them all at once Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic Adds better tracking of what options menu category is shown so refreshes don't reset it Add better handling for changing resolution in options menu and getting it to apply properly Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript Removed unneeded extra logging from asset browser drag-n-drop actions Adds item to RMB context menu in AB to regenerate preview images Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1. Temporarily disables fields and handling of 'open in Torsion'. Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes Adds proper loading of roughness and metalness fields in material editor Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else Adds check to avoid spam of markItem errors in the event requested tree item is invalid Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
item[ 7 ] = "Regenerate Preview Image" TAB "" TAB "AssetBrowser.regeneratePreviewImage();";
item[ 8 ] = "-";
Removed unneeded default irradiance and prefilter cubemaps, and their convars Added getGUIPath console function to guiAsset Corrected console function documentation for getScriptPath in MaterialAsset Added getter console functions to PostEffectAsset Added getAnimationPath console function to PostEffectAsset Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az) Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az) Fixed duplicate naming of quality levels on LightingQualityList Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu Improves check for unapplied graphics options on options menu and applies them all at once Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic Adds better tracking of what options menu category is shown so refreshes don't reset it Add better handling for changing resolution in options menu and getting it to apply properly Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript Removed unneeded extra logging from asset browser drag-n-drop actions Adds item to RMB context menu in AB to regenerate preview images Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1. Temporarily disables fields and handling of 'open in Torsion'. Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes Adds proper loading of roughness and metalness fields in material editor Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else Adds check to avoid spam of markItem errors in the event requested tree item is invalid Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
item[ 9 ] = "Re-Import Asset" TAB "" TAB "AssetBrowser.reImportAsset();";
item[ 10 ] = "-";
item[ 11 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
item[ 12 ] = "-";
item[ 13 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
jumpFileName = "";
jumpLineNumber = "";
};
}
if( !isObject( RestoreBackupListPopup ) )
{
new PopupMenu( RestoreBackupListPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
radioSelection = false;
};
}
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();";
item[ 3 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
item[ 4 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
item[ 5 ] = "-";
Item[ 6 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
item[ 7 ] = "-";
Item[ 8 ] = "Restore Backup" TAB RestoreBackupListPopup;
item[ 9 ] = "-";
item[ 10 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
item[ 11 ] = "-";
item[ 12 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
jumpFileName = "";
jumpLineNumber = "";
};
}
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 ] = "-";
Item[ 6 ] = "Restore Backup" TAB RestoreBackupListPopup;
item[ 7 ] = "-";
item[ 8 ] = "Open File Location" TAB "" TAB "AssetBrowser.openFileLocation();";
item[ 9 ] = "-";
item[ 10 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
jumpFileName = "";
jumpLineNumber = "";
};
}
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;
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
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);";
item[ 2 ] = "-";
item[ 3 ] = "Create Game Mode" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GameModeType\", AssetBrowser.selectedModule);";
//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;
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
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);";
item[ 3 ] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[ 4 ] = "Create Terrain Data" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule);";
item[ 5 ] = "-";
* Fixes handling for Image, Material and Shape Assets' inspector fields so they properly work with non-object targeted inspectors, such as the PostFXEditor * Updated PostFXEditor scripts to handle refreshing properly when certainl field types(assetId fields) are changed * Adjusted display handling of slider values on guiGameSettingsCtrl to show 0.x decimal format instead of 0.xxxxx * Fixed pad length of item names in guiTreeView for items that are marked to avoid console spam * Fixed local offseting for popupMenus so scaled/offset window position doesn't cause the popup menu to offset from mouse click position(courtesy OTHG_Mars) * Fix issue with terrain where, due to default value save validation, the global scope for the terrain collision list would be whiped when saving, causing players to fall through terrain. Moved to per-terrain convexLists * Fixed issue with the core camera model mesh and updated references so camera bookmarks display properly * Fixed console spam during asset browser initialization where it would try and expand the directory tree even though the dir tree isn't populated yet * Fixed handling of Open File Location RMB menu action to properly deal with script and datablock types * Removed unusuable "Create ___" asset type prompts from the RMB menus for the AB to avoid confusion * Improved slider offset positioning for various popup sliders on editor toolbars * Anchored the visibility popup menu to the button for more consistent formatting and better feel * Shifted various visibility toggles from 'in place' on the menu buttons to functions, allowing it to also properly mark the menu entries as checked or not, improving usability
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);";
};
}
if( !isObject( AddNewCppAssetPopup ) )
{
%this.AddNewCppAssetPopup = new PopupMenu( AddNewCppAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
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);";
};
//%this.AddNewScriptAssetPopup.insertSubMenu(0, "Create Component", AddNewComponentAssetPopup);
}
if( !isObject( AddNewAssetPopup ) )
{
%this.AddNewAssetPopup = new PopupMenu( AddNewAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[0] = "Create Folder" TAB "" TAB "AssetBrowser.CreateNewFolder();";
item[1] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[2] = "Create Code Asset" TAB AddNewScriptAssetPopup;
item[3] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[4] = "Create Art Asset" TAB AddNewArtAssetPopup;
item[5] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[6] = "Create Level" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewLevelAsset(\"NewLevel\", AssetBrowser.selectedModule);";
item[7] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[8] = "Create C++ Asset" TAB AddNewCppAssetPopup;
item[9] = "-";
Changed default terrain paths to go into data/terrains if nothing is set Added default terrianmat definition for warning_material Corrected separator-h image path for a few GUI controls Corrected SelectAssetPathWindow reference so it focuses the window right Changed new asset window to work with new Select Path window and address system Added call to force AssetBrowser to load/initialize when the tools are initialized(ensures anything utilizing assets in other tools don't have reference issues) Standardized drag-n-drop move behavior in the Asset browser so dragging onto the folder tree and a folder in the browser both behave more predictably If import config is set to not allow importing with errors, then the Done button is disabled when errors are detected Updated the example assettype file for the AB Fixed up move/delete/rename behavior for folders in AB Begun full standardization of move/delete/rename actions for other asset types in AB Added standardized call for New Asset field fillouts by letting the asset types populate them Moved terrain block creation to the standard create call so it can accept other normal fields like resolution Updated the 'Do you want to create' terrain block prompts to generate the asset if yes, and if no it'll prompt to go find an existing terrain asset Added placeholder image for terrain material asset for preview Updated refresh behavior for terrain material assets so they properly populate on creation now Added standardized functions to the directoryHandling class for folder/file manipulation Corrected some warnMat image references
2019-12-23 12:37:55 -06:00
item[10] = "Create New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
item[11] = "-";
Removed unneeded default irradiance and prefilter cubemaps, and their convars Added getGUIPath console function to guiAsset Corrected console function documentation for getScriptPath in MaterialAsset Added getter console functions to PostEffectAsset Added getAnimationPath console function to PostEffectAsset Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az) Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az) Fixed duplicate naming of quality levels on LightingQualityList Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu Improves check for unapplied graphics options on options menu and applies them all at once Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic Adds better tracking of what options menu category is shown so refreshes don't reset it Add better handling for changing resolution in options menu and getting it to apply properly Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript Removed unneeded extra logging from asset browser drag-n-drop actions Adds item to RMB context menu in AB to regenerate preview images Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1. Temporarily disables fields and handling of 'open in Torsion'. Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes Adds proper loading of roughness and metalness fields in material editor Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else Adds check to avoid spam of markItem errors in the event requested tree item is invalid Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
item[12] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
Item[ 13 ] = "-";
item[ 14 ] = "Open Folder Location" TAB "" TAB "AssetBrowser.openFolderLocation();";
};
}
if( !isObject( EditModulePopup ) )
{
new PopupMenu( EditModulePopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "New Asset" TAB AddNewAssetPopup;
item[ 1 ] = "Reload Module" TAB "" TAB "AssetBrowser.reloadModule();";
Updated Assimp Added initial behavior for ImageAssets to hold a list of GFX resources of different texture profiles to avoid mem leaks with incorrect-typed usages Added function to ImageAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found Added function to ShapeAsset to get best-fit asset, allowing for fallbacks if the requested assetID is not found Disabled fields for dynamic and static shadowmap refresh rates Moved noShape model to core/rendering/shapes to place it in a more logical module position Added an include to avoid undefined type compile error and removed unneeded semicolon from zone code Added call to reload probe textures when a reloadTextures call is made Adjusted default directional light shadowmap settings to not be as extreme Added utility function to probe manager to allow any class to request a 'best fit' list of probes that would affect a given location, allowing other classes such as fog or particles to utilize IBL. Also updated probeManager's forward rendering to utilize same function to reduce code duplication. Shifted shape loader code to utilize assimp for loader consistency and testing Changed render bin used for SSAO postfx so it runs at the right time Made Core_Rendering module scan for assets Updated loose file references to a number of assets to follow proper formatting Refactored asset import code to follow a more consistent object heirarchy structure on importing assets, allowing more reliable cross-referencing between inbound items Updated asset import logic for materials/images so that they properly utilize ImageType. Images correctly save out the assigned image type, materials reference the images' type to know what map slot they should be used in. Importer logic also updated to better find-and-add associated images based on type. Cleaned up a bunch of old, outdated code in the asset importer Added initial handling for in-place importing of files without needing to process them through the UI. Added ability to edit module script from RMB context menu if torsion path is set Updated list field code for variable inspector to utilize correct ownerObject field
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 ] = "-";
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 ] = "-";
item[ 12 ] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
};
}
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();";
};
}
if( !isObject( EditFolderPopup ) )
{
new PopupMenu( EditFolderPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
Item[ 0 ] = "Create" TAB AddNewAssetPopup;
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();";
item[ 6 ] = "-";
item[ 7 ] = "View Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
};
}
if( !isObject( EditAssetCategoryPopup ) )
{
new PopupMenu( EditAssetCategoryPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Toggle Autoloading of Script Assets" TAB "" TAB "AssetBrowser.toggleAutoloadAsset(\"Script\");";
};
}
if( !isObject( AssetTypeListPopup ) )
{
new PopupMenu( AssetTypeListPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
radioSelection = false;
};
AssetTypeListPopup.addItem(0, "All" TAB "" TAB %this @ ".toggleAssetTypeFilter(0);");
AssetTypeListPopup.addItem(1, "-");
%listIndex = 1;
for(%i=0; %i < ABAssetTypesList.Count(); %i++)
{
%assetTypeData = ABAssetTypesList.getValue(%i);
if(getField(%assetTypeData, 3) != true)
continue;
AssetTypeListPopup.addItem(%listIndex, getField(%assetTypeData,1) TAB "" TAB %this @ ".toggleAssetTypeFilter(" @ %listIndex @ ");");
%listIndex++;
}
}
//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();";
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();";
};
BrowserVisibilityPopup.enableItem(5, false);
BrowserVisibilityPopup.enableItem(9, false);
}
//
//Import Legacy menus
if( !isObject( ImportAssetsPopup ) )
{
new PopupMenu( ImportAssetsPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
item[ 1 ] = "Import new assets" TAB "" TAB "Canvas.pushDialog(AssetImportCtrl);";
};
}
//
// Import Asset Actions
//
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();";
};
}
if( !isObject( ImportAssetActions ) )
{
%this.ImportAssetActions = new PopupMenu( ImportAssetActions )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
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();";
};
}
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);
}
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
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();";
};
}
}
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)
{
}
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();
}
}
}