2018-01-28 21:30:17 +00:00
//AssetBrowser.addToolbarButton
function AssetBrowser::addToolbarButton(%this)
{
%button = new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = AssetBrowserBtn;
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "180 0";
Extent = "25 19";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "AssetBrowser.ShowDialog();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Asset Browser";
hovertime = "750";
2021-08-02 09:20:27 +00:00
bitmapAsset = "ToolsModule:menuGrid_n_image";
2020-07-11 21:49:06 +00:00
bitmapMode = "Stretched";
2018-01-28 21:30:17 +00:00
buttonType = "PushButton";
groupNum = "0";
useMouseEvents = "0";
};
ToolsToolbarArray.add(%button);
EWToolsToolbar.setExtent((25 + 8) * (ToolsToolbarArray.getCount()) + 12 SPC "33");
}
//
2021-09-01 06:12:16 +00:00
function AssetBrowser::initialize(%this)
2018-01-28 21:30:17 +00:00
{
2019-05-04 16:49:42 +00:00
// manage preview array
if(!isObject(AssetPreviewArray))
new ArrayObject(AssetPreviewArray);
2021-12-05 04:47:10 +00:00
if(!isObject(ObjectCreator))
new ScriptObject(ObjectCreator);
2019-12-03 06:09:18 +00:00
if(!isObject(%this.dirHandler))
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
{
2019-12-03 06:09:18 +00:00
%this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
%this.dirHandler.currentAddress = "data/";
}
2019-05-04 16:49:42 +00:00
2019-12-03 06:09:18 +00:00
AssetBrowser-->filterTree.buildIconTable( ":tools/classIcons/Prefab:tools/classIcons/Prefab" @
":tools/classIcons/SimSet:tools/classIcons/SimSet");
2019-10-20 07:47:15 +00:00
2019-05-04 16:49:42 +00:00
%this.isReImportingAsset = false;
2019-12-03 06:09:18 +00:00
2019-05-04 16:49:42 +00:00
%this.coreModulesFilter = false;
2019-10-20 07:47:15 +00:00
%this.toolsModulesFilter = false;
2019-05-04 16:49:42 +00:00
%this.onlyShowModulesWithAssets = false;
2019-10-20 07:47:15 +00:00
%this.folderPanelState = true;
%this.folderPanelSplit = 0;
2019-07-15 05:34:18 +00:00
%this.templateFilesPath = "tools/assetBrowser/scripts/templateFiles/";
2019-05-04 16:49:42 +00:00
//First, build our our list of active modules
%modulesList = ModuleDatabase.findModules(true);
2020-07-11 21:49:06 +00:00
AssetBrowser-->previewSlider.setValue(EditorSettings.value("Assets/Browser/previewTileSize", "1.0"));
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 07:47:28 +00:00
2020-08-26 18:40:04 +00:00
AssetBrowser-->filterAssetsButton.setActive(true);
2019-05-04 16:49:42 +00:00
}
2021-09-01 06:12:16 +00:00
function AssetBrowser::onAdd(%this)
{
}
function AssetBrowser::onWake(%this)
{
%this.initialize();
}
function AssetBrowser::onDialogPop(%this)
{
%lastPosExt = AssetBrowserWindow.position SPC AssetBrowserWindow.extent;
EditorSettings.setValue("Assets/Browser/LastPosExt", %lastPosExt);
}
function AssetBrowser::restoreLastPosExt(%this)
{
%lastPosExt = EditorSettings.value("Assets/Browser/LastPosExt", "");
if(%lastPosExt !$= "")
{
AssetBrowserWindow.resize(getWord(%lastPosExt, 0), getWord(%lastPosExt, 1), getWord(%lastPosExt, 2), getWord(%lastPosExt, 3));
}
}
2020-07-11 21:49:06 +00:00
function contentTreeTabBook::onTabSelected(%this, %tabText, %tabIndex)
{
if(%tabText $= "Content")
{
//Force it to navigate to current active directory, which also rebuilds the
//tree
AssetBrowser.dirHandler.navigateTo(AssetBrowser.dirHandler.currentAddress);
}
else
{
AssetBrowser-->filterTree.clear();
AssetBrowser-->filterTree.buildVisibleTree(true);
}
}
2019-05-04 16:49:42 +00:00
//Filters
function AssetBrowser::showFilterPopup(%this)
{
BrowserVisibilityPopup.showPopup(Canvas);
}
function AssetBrowser::viewCoreModulesFilter(%this)
{
2019-10-20 07:47:15 +00:00
%oldVal = EditorSettings.value("Assets/Browser/showCoreModule", false);
%newVal = !%oldVal;
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 07:47:28 +00:00
%this.coreModulesFilter = %newVal;
2019-10-20 07:47:15 +00:00
BrowserVisibilityPopup.checkItem(0,%newVal);
EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal);
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 07:47:28 +00:00
AssetBrowser.loadDirectories();
2019-10-20 07:47:15 +00:00
}
function AssetBrowser::viewToolsModulesFilter(%this)
{
%oldVal = EditorSettings.value("Assets/Browser/showToolsModule", false);
%newVal = !%oldVal;
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 07:47:28 +00:00
%this.toolsModulesFilter = %newVal;
2019-10-20 07:47:15 +00:00
BrowserVisibilityPopup.checkItem(1,%newVal);
2019-05-04 16:49:42 +00:00
2019-10-20 07:47:15 +00:00
EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal);
2019-05-04 16:49:42 +00: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 07:47:28 +00:00
AssetBrowser.loadDirectories();
2019-05-04 16:49:42 +00:00
}
function AssetBrowser::viewPopulatedModulesFilter(%this)
{
2019-10-20 07:47:15 +00:00
%oldVal = EditorSettings.value("Assets/Browser/showOnlyPopulatedModule", false);
%newVal = !%oldVal;
2019-05-04 16:49:42 +00:00
2019-10-20 07:47:15 +00:00
BrowserVisibilityPopup.checkItem(2,%newVal);
EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal);
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 07:47:28 +00:00
AssetBrowser.loadDirectories();
2019-10-20 07:47:15 +00:00
}
function AssetBrowser::toggleShowingFolders(%this)
{
%oldVal = EditorSettings.value("Assets/Browser/showFolders", false);
%newVal = !%oldVal;
BrowserVisibilityPopup.checkItem(4,%newVal);
EditorSettings.setValue("Assets/Browser/showFolders", %newVal);
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 07:47:28 +00:00
AssetBrowser.loadDirectories();
2019-10-20 07:47:15 +00:00
}
function AssetBrowser::toggleShowingEmptyFolders(%this)
{
%oldVal = EditorSettings.value("Assets/Browser/showEmptyFolders", false);
%newVal = !%oldVal;
BrowserVisibilityPopup.checkItem(5,%newVal);
EditorSettings.setValue("Assets/Browser/showEmptyFolders", %newVal);
2019-05-04 16:49:42 +00:00
2019-12-03 06:09:18 +00:00
AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
2019-11-24 12:52:34 +00:00
function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
2019-10-20 07:47:15 +00:00
{
%isChecked = AssetTypeListPopup.isItemChecked(%assetTypeIdx);
2019-11-24 12:52:34 +00:00
//Clear existing filters
if(%assetTypeIdx == 0)
{
for(%i=0; %i < AssetFilterTypeList.Count() + 1; %i++)
{
AssetTypeListPopup.checkItem(%i, false);
}
AssetTypeListPopup.checkItem(0, true);
}
else
{
if(%isChecked)
{
%anyOtherFilters = false;
for(%i=1; %i < AssetFilterTypeList.Count() + 1; %i++)
{
if(%assetTypeIdx == %i)
continue;
if(AssetTypeListPopup.isItemChecked(%i))
{
%anyOtherFilters = true;
break;
}
}
}
if(%isChecked && !%anyOtherFilters)
{
for(%i=0; %i < AssetFilterTypeList.Count() + 1; %i++)
{
AssetTypeListPopup.checkItem(%i, false);
}
AssetTypeListPopup.checkItem(0, true);
}
else
{
AssetTypeListPopup.checkItem(0, false);
AssetTypeListPopup.checkItem(%assetTypeIdx, !%isChecked);
}
}
2020-07-11 21:49:06 +00:00
//Update the displayed search text!
//First, clear out the old type search term
for(%i=0; %i < AssetSearchTerms.count(); %i++)
{
%action = AssetSearchTerms.getKey(%i);
if(%action $= "type")
{
AssetSearchTerms.erase(%i);
%i--;
}
}
//Update our search terms
%newSearchPhrase = "";
for(%i=0; %i < AssetFilterTypeList.Count() + 1; %i++)
{
%isChecked = AssetTypeListPopup.isItemChecked(%i);
if(!%isChecked)
continue;
%itemText = AssetTypeListPopup.getItemText(%i);
if(%itemText $= "All")
continue;
AssetSearchTerms.add("type", %itemText);
}
%this.updateSearchTextFromFilter();
2019-11-24 12:52:34 +00:00
%this.rebuildAssetArray();
2019-10-20 07:47:15 +00:00
}
2019-12-03 06:09:18 +00:00
//
2018-01-28 21:30:17 +00:00
function AssetBrowser::selectAsset( %this, %asset )
{
if(AssetBrowser.selectCallback !$= "")
{
// The callback function should be ready to intake the returned material
//eval("materialEd_previewMaterial." @ %propertyField @ " = " @ %value @ ";");
if( AssetBrowser.returnType $= "name" )
{
2021-05-05 02:49:19 +00:00
// TODO!
%name = "";
2018-01-28 21:30:17 +00:00
eval( "" @ AssetBrowser.selectCallback @ "(" @ %name @ ");");
}
else
{
%command = "" @ AssetBrowser.selectCallback @ "(\"" @ %asset @ "\");";
eval(%command);
}
}
else
{
//try just setting the asset
%this.changeAsset();
}
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
if(isObject(Inspector))
2021-02-21 08:16:34 +00:00
Inspector.refresh();
2018-01-28 21:30:17 +00:00
AssetBrowser.hideDialog();
}
function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %targetObj, %fieldName, %returnType)
{
// Set the select callback
AssetBrowser.selectCallback = %selectCallback;
AssetBrowser.returnType = %returnType;
AssetBrowser.assetTypeFilter = %AssetTypeFilter;
AssetBrowser.fieldTargetObject = %targetObj;
AssetBrowser.fieldTargetName = %fieldName;
2021-02-21 08:16:34 +00:00
Canvas.popDialog(AssetBrowser);
2019-06-13 05:37:12 +00:00
Canvas.pushDialog(AssetBrowser);
2021-09-01 06:12:16 +00:00
2018-01-28 21:30:17 +00:00
AssetBrowser.setVisible(1);
AssetBrowserWindow.setVisible(1);
AssetBrowserWindow.selectWindow();
2019-11-24 12:52:34 +00:00
//If we're special-case filtering(like for selecting a given type), then ignore our normal
//visibility filter
if(%AssetTypeFilter !$= "")
{
2020-08-26 18:40:04 +00:00
AssetBrowser-->filterAssetsButton.setActive(false);
2020-08-09 06:32:27 +00:00
}
else
{
2020-08-26 18:40:04 +00:00
AssetBrowser-->filterAssetsButton.setActive(true);
2019-11-24 12:52:34 +00:00
}
2018-01-28 21:30:17 +00:00
if(%selectCallback $= "")
{
//we're not in selection mode, so just hide the select button
%this-->SelectButton.setHidden(true);
2020-09-02 06:26:43 +00:00
%this.selectMode = 0;
2018-01-28 21:30:17 +00:00
}
else
{
%this-->SelectButton.setHidden(false);
2020-09-02 06:26:43 +00:00
%this.selectMode = 1;
2018-01-28 21:30:17 +00:00
}
2019-12-03 06:09:18 +00:00
AssetBrowser.loadDirectories();
2021-09-01 06:12:16 +00:00
AssetBrowser.restoreLastPosExt();
2018-01-28 21:30:17 +00:00
}
function AssetBrowser::hideDialog( %this )
{
AssetBrowser.setVisible(1);
AssetBrowserWindow.setVisible(1);
Canvas.popDialog(AssetBrowser_addModule);
Canvas.popDialog(ImportAssetWindow);
Canvas.popDialog(AssetBrowser);
}
2021-09-01 06:12:16 +00:00
function AssetBrowser::toggleDialog( %this )
{
if(AssetBrowser.isAwake())
{
AssetBrowser.hideDialog();
}
else
{
AssetBrowser.showDialog();
}
}
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 07:47:28 +00:00
function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
2018-01-28 21:30:17 +00:00
{
2019-05-04 16:49:42 +00:00
if(!isObject(%this.previewData))
{
%this.previewData = new ScriptObject();
}
Adjusted handling for the bitmap and bitmapAsset fields for guiBitmapButtonCtrl to forcefully update the button states when changed, ensuring that the bitmaps refresh when changed via the field
Added callback for onResize to guiWindowCtrl so controls - such as the EditorTree - can be properly resized in certain circumstances when the window is changed
Added getIncrement() and getRange() to GuiGameSettingsCtrl to better facilitate options manipulation on the script side
Corrected some of the console method documentation strings in GuiGameSettingsCtrl
Removed some unneeded, extraneous files and their asset definitions that came from odd import conversions. Where applicable, created cleaned up versions to make naming conventions and references stable
Fixed canvas mode update text typo: FSAA -> FXAA
Added logic to DOF, Light Rays, SSAO and Vignette postFX's to check both the preset setting AND the user preference before enabling.
Shifted initialization order so PostFX's are loaded before we configure the canvas, to ensure stuff like the FXAAPostFX exists and can be toggled on on load
Fixed multiple issues with options menu:
When using gamepad, unable to navigate from categories to options. Fixed so can now traverse as normal
Input limitations on gamepad necessitated changing of how setting applying happens, is now done as a 'apply or discard' prompt when leaving the options menu
Added proper handling for adjusting settings with gamepad with left/right inputs
Fixed issue where the unapplied change for an option was sometimes being processed as an object name rather than an implicit string. Now made to be explicit strings to avoid issue.
Made the menu button input for "Select" to go from categories to options gamepad only, and hidden when in the options list
Fixed issue where changing window mode didn't correctly affect resolution option. Now set up so changing this field correctly refreshes the resolution option. Specifically, when on borderless, the resolution field does not show, preventing confusion as it is always full resolution
Generally have the options list refresh when changes happen to allow any and all fields to be able to dynamically respond to other options having changed improving flexibility.
Cleaned up old, unused, commented out functions
Added ability on OKCancel message boxes to override the button text if needed
Fixed issue with AssetBrowser where the shrink/grow icons next to the preview size slider were not anchored correctly.
Adjusted callback logic so if preview slider is clicked on, rather than dragged, it will correctly update the zoom values
Added sorting to Modules List dropdown for the AssetBrowser
Improved standardization of double-clicking in AssetBrowser. Now defaults to editing action if regularly browsing and selecting if in select mode. Still allows regular per-type overrides as normal
Moved definition of GuiDisabledTextEditProfile to gui profiles.ed.tscript file, removed duplicates to stop error spam
Adjusted default settings value for double-click action in AB to be edit to prevent unstable behavior
Removed old file refs from Load Recent list in the default settings
2022-03-27 03:36:37 +00:00
else
{
%this.previewData.tooltip = "";
%this.previewData.assetName = "";
%this.previewData.previewImage = "";
%this.previewData.doubleClickCommand = "";
}
2019-05-04 16:49:42 +00:00
2018-01-28 21:30:17 +00:00
%previewImage = "core/art/warnmat";
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 07:47:28 +00:00
if(/*%moduleName !$= "" && */ModuleDatabase.findModule(%moduleName, 1) !$= "")
2019-10-20 07:47:15 +00:00
{
%assetDesc = AssetDatabase.acquireAsset(%asset);
%assetName = AssetDatabase.getAssetName(%asset);
%assetType = AssetDatabase.getAssetType(%asset);
}
else
{
2020-04-15 17:15:12 +00:00
//special-case entry
if(getFieldCount(%asset) > 1)
{
2021-01-02 07:58:15 +00:00
%assetType = getField(%asset,0);
2020-04-15 17:15:12 +00:00
%assetName = getField(%asset, 1);
%sdfasdgah = true;
if(%assetType $= "Folder")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
else if(%assetType $= "Datablock")
{
%assetDesc = %assetName;
%assetDesc.assetType = %assetType;
}
2020-07-11 21:49:06 +00:00
else if(%assetType $= "LooseFile")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
%fullPath = strreplace(%fullPath, ".", "-");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
else if(%assetType $= "Prefab")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
%fullPath = strreplace(%fullPath, ".", "-");
2021-01-02 07:58:15 +00:00
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
else if(%assetType $= "Cpp")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
%fullPath = strreplace(%fullPath, ".", "-");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
else if(%assetType $= "tscript")
{
%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
%fullPath = strreplace(%fullPath, "/", "_");
%fullPath = strreplace(%fullPath, ".", "-");
2020-07-11 21:49:06 +00:00
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;
}
2021-01-24 10:33:28 +00:00
else if(%assetType $= "Creator")
{
%assetDesc = %assetName;
%assetDesc.assetType = %assetType;
%moduleName = %assetDesc;
}
2020-04-15 17:15:12 +00:00
}
/*%fullPath = %moduleName !$= "" ? %moduleName @ "/" @ %assetName : %assetName;
2019-10-20 07:47:15 +00:00
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
%assetDesc.dirPath = %moduleName;
2020-04-15 17:15:12 +00:00
%assetDesc.assetName = %assetName;
%assetDesc.description = %moduleName @ "/" @ %assetName;
%assetDesc.assetType = %assetType;*/
2019-10-20 07:47:15 +00:00
2020-04-15 17:15:12 +00:00
//%assetName = %asset;
//%assetType = "Folder";
2019-10-20 07:47:15 +00:00
}
2019-11-24 12:52:34 +00:00
2020-07-11 21:49:06 +00:00
%previewSize = 100 SPC 100;
2019-10-20 07:47:15 +00:00
%previewBounds = 20;
2018-01-28 21:30:17 +00:00
%tooltip = %assetName;
2020-07-11 21:49:06 +00:00
%textBottomPad = 20;
%previewButton = new GuiIconButtonCtrl()
{
class = "AssetBrowserPreviewButton";
useMouseEvents = true;
iconLocation = "Center";
sizeIconToButton = true;
makeIconSquare = true;
textLocation = "Bottom";
extent = %previewSize.x SPC %previewSize.y + %textBottomPad;
buttonType = "RadioButton";
2022-04-23 21:07:36 +00:00
buttonMargin = "0 -10";
2020-07-11 21:49:06 +00:00
profile = ToolsGuiDefaultProfile;
};
%previewScaleSize = AssetBrowser-->previewSlider.getValue();
if(%previewScaleSize $= "")
{
%previewScaleSize = 1;
AssetBrowser-->previewSlider.setValue(1);
2019-11-24 12:52:34 +00:00
}
2019-05-04 16:49:42 +00:00
2021-09-10 07:13:56 +00:00
if(%previewScaleSize == 0 || startsWith(AssetBrowser.dirHandler.currentAddress, "Creator"))
2020-07-11 21:49:06 +00:00
{
%previewButton.iconLocation = "Left";
%previewButton.textLocation = "Right";
2021-08-30 06:50:47 +00:00
%previewButton.setextent(120,20);
2022-04-23 21:07:36 +00:00
AssetBrowser.previewListMode = true;
2020-07-11 21:49:06 +00:00
}
else
{
%size = %previewSize.x * %previewScaleSize;
2021-08-30 06:50:47 +00:00
%previewButton.setextent(%size,%size + %textBottomPad);
2022-04-23 21:07:36 +00:00
AssetBrowser.previewListMode = false;
2020-07-11 21:49:06 +00:00
}
//%previewButton.extent = %previewSize.x + %previewBounds SPC %previewSize.y + %previewBounds + 24;
2019-11-24 12:52:34 +00:00
%previewButton.assetName = %assetName;
%previewButton.moduleName = %moduleName;
%previewButton.assetType = %assetType;
Adjusted handling for the bitmap and bitmapAsset fields for guiBitmapButtonCtrl to forcefully update the button states when changed, ensuring that the bitmaps refresh when changed via the field
Added callback for onResize to guiWindowCtrl so controls - such as the EditorTree - can be properly resized in certain circumstances when the window is changed
Added getIncrement() and getRange() to GuiGameSettingsCtrl to better facilitate options manipulation on the script side
Corrected some of the console method documentation strings in GuiGameSettingsCtrl
Removed some unneeded, extraneous files and their asset definitions that came from odd import conversions. Where applicable, created cleaned up versions to make naming conventions and references stable
Fixed canvas mode update text typo: FSAA -> FXAA
Added logic to DOF, Light Rays, SSAO and Vignette postFX's to check both the preset setting AND the user preference before enabling.
Shifted initialization order so PostFX's are loaded before we configure the canvas, to ensure stuff like the FXAAPostFX exists and can be toggled on on load
Fixed multiple issues with options menu:
When using gamepad, unable to navigate from categories to options. Fixed so can now traverse as normal
Input limitations on gamepad necessitated changing of how setting applying happens, is now done as a 'apply or discard' prompt when leaving the options menu
Added proper handling for adjusting settings with gamepad with left/right inputs
Fixed issue where the unapplied change for an option was sometimes being processed as an object name rather than an implicit string. Now made to be explicit strings to avoid issue.
Made the menu button input for "Select" to go from categories to options gamepad only, and hidden when in the options list
Fixed issue where changing window mode didn't correctly affect resolution option. Now set up so changing this field correctly refreshes the resolution option. Specifically, when on borderless, the resolution field does not show, preventing confusion as it is always full resolution
Generally have the options list refresh when changes happen to allow any and all fields to be able to dynamically respond to other options having changed improving flexibility.
Cleaned up old, unused, commented out functions
Added ability on OKCancel message boxes to override the button text if needed
Fixed issue with AssetBrowser where the shrink/grow icons next to the preview size slider were not anchored correctly.
Adjusted callback logic so if preview slider is clicked on, rather than dragged, it will correctly update the zoom values
Added sorting to Modules List dropdown for the AssetBrowser
Improved standardization of double-clicking in AssetBrowser. Now defaults to editing action if regularly browsing and selecting if in select mode. Still allows regular per-type overrides as normal
Moved definition of GuiDisabledTextEditProfile to gui profiles.ed.tscript file, removed duplicates to stop error spam
Adjusted default settings value for double-click action in AB to be edit to prevent unstable behavior
Removed old file refs from Load Recent list in the default settings
2022-03-27 03:36:37 +00:00
if(%this.selectMode)
{
%doubleClickCommand = "AssetBrowser.selectAsset( AssetBrowser.selectedAsset );";
}
else
{
%doubleClickCommand = "AssetBrowser.editAsset( "@%assetDesc@" );";
}
2022-04-23 21:07:36 +00:00
%this.previewData.previewLoaded = true;
2019-11-24 12:52:34 +00:00
//Build out the preview
2020-07-11 21:49:06 +00:00
%buildCommand = %this @ ".build" @ %assetType @ "Preview(\"" @ %assetDesc @ "\"," @ %this.previewData @ ");";
2019-11-24 12:52:34 +00:00
eval(%buildCommand);
//debug dump
%tooltip = %this.previewData.tooltip;
%assetName = %this.previewData.assetName;
%previewImage = %this.previewData.previewImage;
Adjusted handling for the bitmap and bitmapAsset fields for guiBitmapButtonCtrl to forcefully update the button states when changed, ensuring that the bitmaps refresh when changed via the field
Added callback for onResize to guiWindowCtrl so controls - such as the EditorTree - can be properly resized in certain circumstances when the window is changed
Added getIncrement() and getRange() to GuiGameSettingsCtrl to better facilitate options manipulation on the script side
Corrected some of the console method documentation strings in GuiGameSettingsCtrl
Removed some unneeded, extraneous files and their asset definitions that came from odd import conversions. Where applicable, created cleaned up versions to make naming conventions and references stable
Fixed canvas mode update text typo: FSAA -> FXAA
Added logic to DOF, Light Rays, SSAO and Vignette postFX's to check both the preset setting AND the user preference before enabling.
Shifted initialization order so PostFX's are loaded before we configure the canvas, to ensure stuff like the FXAAPostFX exists and can be toggled on on load
Fixed multiple issues with options menu:
When using gamepad, unable to navigate from categories to options. Fixed so can now traverse as normal
Input limitations on gamepad necessitated changing of how setting applying happens, is now done as a 'apply or discard' prompt when leaving the options menu
Added proper handling for adjusting settings with gamepad with left/right inputs
Fixed issue where the unapplied change for an option was sometimes being processed as an object name rather than an implicit string. Now made to be explicit strings to avoid issue.
Made the menu button input for "Select" to go from categories to options gamepad only, and hidden when in the options list
Fixed issue where changing window mode didn't correctly affect resolution option. Now set up so changing this field correctly refreshes the resolution option. Specifically, when on borderless, the resolution field does not show, preventing confusion as it is always full resolution
Generally have the options list refresh when changes happen to allow any and all fields to be able to dynamically respond to other options having changed improving flexibility.
Cleaned up old, unused, commented out functions
Added ability on OKCancel message boxes to override the button text if needed
Fixed issue with AssetBrowser where the shrink/grow icons next to the preview size slider were not anchored correctly.
Adjusted callback logic so if preview slider is clicked on, rather than dragged, it will correctly update the zoom values
Added sorting to Modules List dropdown for the AssetBrowser
Improved standardization of double-clicking in AssetBrowser. Now defaults to editing action if regularly browsing and selecting if in select mode. Still allows regular per-type overrides as normal
Moved definition of GuiDisabledTextEditProfile to gui profiles.ed.tscript file, removed duplicates to stop error spam
Adjusted default settings value for double-click action in AB to be edit to prevent unstable behavior
Removed old file refs from Load Recent list in the default settings
2022-03-27 03:36:37 +00:00
if(%this.previewData.doubleClickCommand !$= "")
%doubleClickCommand = %this.previewData.doubleClickCommand;
2019-11-24 12:52:34 +00:00
2020-07-11 21:49:06 +00:00
%previewButton.assetName = %assetName;
%previewButton.moduleName = %moduleName;
%previewButton.assetType = %assetType;
2019-12-23 18:37:55 +00:00
2021-07-21 01:05:49 +00:00
%previewButton.bitmapAsset = %this.previewData.previewImage;
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
%previewButton.profile = "AssetBrowserPreview" @ %previewButton.assetType;
%previewButton.tooltip = %this.previewData.tooltip;
2020-08-09 06:32:27 +00:00
%previewButton.Command = "AssetBrowser.updateSelection( $ThisControl.assetName, $ThisControl.moduleName );";
2020-07-11 21:49:06 +00:00
%previewButton.altCommand = %doubleClickCommand;
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
%previewButton.text = %this.previewData.assetName;
%previewButton.text.originalAssetName = %this.previewData.assetName;
2019-11-24 12:52:34 +00:00
2018-01-28 21:30:17 +00:00
// add to the gui control array
2019-11-24 12:52:34 +00:00
AssetBrowser-->assetList.add(%previewButton);
2018-01-28 21:30:17 +00:00
// add to the array object for reference later
2022-04-23 21:07:36 +00:00
if(%this.previewData.previewLoaded == false)
AssetPreviewArray.add( %previewButton );
2018-01-28 21:30:17 +00:00
}
2019-12-03 06:09:18 +00:00
function AssetBrowser::refresh(%this)
{
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 07:47:28 +00:00
if(!%this.dirty)
{
%this.dirty = true;
%this.schedule(1, "doRefresh");
}
}
function AssetBrowser::doRefresh(%this)
{
if(%this.dirty)
{
%this.navigateTo(%this.dirHandler.currentAddress);
//Forces a clean collapse of the tree for any not-really-exposed items
2021-08-14 03:27:12 +00:00
%dataItem = AssetBrowser-->filterTree.findItemByName("data");
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 07:47:28 +00:00
AssetBrowser-->filterTree.expandItem(%dataItem, false);
AssetBrowser-->filterTree.expandItem(%dataItem);
%this.dirty = false;
}
2019-12-03 06:09:18 +00:00
}
2022-04-23 21:07:36 +00:00
function AssetBrowser::populatePreviewImages(%this)
{
echo("AssetBrowser::populatePreviewImages() - Previews to generate: " @ AssetPreviewArray.count());
for(%i=0; %i < AssetPreviewArray.count(); %i++)
{
%previewButton = AssetPreviewArray.getKey(%i);
%type = %previewButton.assetType;
echo(" - Generating preview for asset: " @ %previewButton.moduleName @ ":" @ %previewButton.assetName);
AssetBrowser.call("generate" @ %previewButton.assetType @ "PreviewImage", %previewButton);
AssetPreviewArray.erase(%i);
echo(" - done, scheduling another pass");
AssetBrowser.schedule(32, "populatePreviewImages");
return;
}
}
2019-10-20 07:47:15 +00: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 07:47:28 +00:00
/*function AssetPreviewButton::onClick(%this)
2019-10-20 07:47:15 +00:00
{
echo("CLICKED AN ASSET PREVIEW BUTTON");
}
function AssetPreviewButton::onDoubleClick(%this)
{
echo("DOUBLE CLICKED AN ASSET PREVIEW BUTTON");
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 07:47:28 +00:00
}*/
2019-10-20 07:47:15 +00:00
//
//
2020-07-11 21:49:06 +00:00
function assetBrowserPreviewSlider::onMouseDragged(%this)
{
EditorSettings.setValue("Assets/Browser/previewTileSize", %this.getValue());
AssetBrowser.refresh();
}
2019-12-03 06:09:18 +00:00
function AssetBrowser::loadDirectories( %this )
2018-01-28 21:30:17 +00:00
{
AssetBrowser-->filterTree.clear();
2019-10-20 07:47:15 +00: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 07:47:28 +00:00
%dataItem = AssetBrowser-->filterTree.insertItem(0, "Content");
2020-07-11 21:49:06 +00:00
AssetBrowser-->filterTree.collectionsIdx = AssetBrowser-->filterTree.insertItem(1, "Collections");
AssetBrowser-->filterTree.modulesIdx = AssetBrowser-->filterTree.insertItem(1, "Modules");
2021-08-14 03:27:12 +00:00
%dataItem = AssetBrowser-->filterTree.insertItem(AssetBrowser-->filterTree.modulesIdx, "data");
2020-07-11 21:49:06 +00:00
AssetBrowser-->filterTree.tagsIdx = AssetBrowser-->filterTree.insertItem(1, "Tags");
2021-09-19 06:01:47 +00:00
AssetBrowser-->filterTree.creatorIdx = AssetBrowser-->filterTree.insertItem(1, "Creator");
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 07:47:28 +00:00
2022-03-29 06:40:07 +00:00
AssetBrowser-->filterTree.clearSelection();
if(%this.selectMode)
{
AssetBrowser-->filterTree.addSelection(AssetBrowser-->filterTree.collectionsIdx);
AssetBrowser-->filterTree.addSelection(AssetBrowser-->filterTree.creatorIdx);
AssetBrowser-->filterTree.hideSelection();
}
2021-08-14 03:27:12 +00:00
%this.dirHandler.loadFolders("data", %dataItem);
2019-10-20 07:47:15 +00:00
2020-07-11 21:49:06 +00:00
%this.loadCollectionSets();
%this.loadTags();
2021-10-17 22:21:29 +00:00
if (!%this.selectMode)
%this.loadCreatorClasses();
2020-07-11 21:49:06 +00:00
2019-10-20 07:47:15 +00:00
//If set to, show core
2020-09-08 06:22:57 +00:00
if(EditorSettings.value("Assets/Browser/showCoreModule", false) == 1)
2019-10-20 07:47:15 +00:00
{
2021-08-14 03:27:12 +00:00
%coreItem = AssetBrowser-->filterTree.insertItem(AssetBrowser-->filterTree.modulesIdx, "core");
%this.dirHandler.loadFolders("core", %coreItem);
2019-10-20 07:47:15 +00:00
}
//If set to, show tools
2020-09-08 06:22:57 +00:00
if(EditorSettings.value("Assets/Browser/showToolsModule", false) == 1)
2019-10-20 07:47:15 +00:00
{
2021-08-14 03:27:12 +00:00
%toolsItem = AssetBrowser-->filterTree.insertItem(AssetBrowser-->filterTree.modulesIdx, "tools");
%this.dirHandler.loadFolders("tools", %toolsItem);
2019-10-20 07:47:15 +00:00
}
2018-01-28 21:30:17 +00: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 07:47:28 +00:00
//Add Non-Asset Scripted Objects. Datablock, etc based
2020-04-15 17:15:12 +00:00
/*%category = getWord( %breadcrumbPath, 1 );
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 07:47:28 +00:00
%dataGroup = "DataBlockGroup";
if(%dataGroup.getCount() != 0)
{
%scriptedItem = AssetBrowser-->filterTree.insertItem(1, "Scripted");
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
{
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
2020-04-15 17:15:12 +00:00
//if ( %obj.category $= "" && %obj.category == 0 )
// continue;
%dbFilename = %obj.getFileName();
%dbFilePath = filePath(%dbFilename);
if(%breadcrumbPath $= %dbFilePath)
{
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 07:47:28 +00:00
//if ( %breadcrumbPath $= "" )
//{
%catItem = AssetBrowser-->filterTree.findItemByName(%obj.category);
if(%catItem == 0)
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.category, "scripted");
/*%ctrl = %this.findIconCtrl( %obj.category );
if ( %ctrl == -1 )
{
%this.addFolderIcon( %obj.category );
}*/
//}
/*else if ( %breadcrumbPath $= %obj.category )
{
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.getName());
}*/
2020-04-15 17:15:12 +00: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 07:47:28 +00:00
2018-01-28 21:30:17 +00:00
2019-10-20 07:47:15 +00:00
AssetBrowser-->filterTree.buildVisibleTree(true);
2019-05-04 16:49:42 +00:00
//Remove any modules that have no assets if we have that filter on
if(%this.onlyShowModulesWithAssets)
{
2021-05-05 02:49:19 +00:00
%modulesList = ModuleDatabase.findModules();
2019-05-04 16:49:42 +00:00
for(%i=0; %i < getWordCount(%modulesList); %i++)
{
%moduleName = getWord(%modulesList, %i).ModuleId;
%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
if(AssetBrowser-->filterTree.isParentItem(%moduleItemId) == false)
AssetBrowser-->filterTree.removeItem(%moduleItemId);
}
}
2018-01-28 21:30:17 +00:00
//special handling for selections
if(AssetBrowser.newModuleId !$= "")
{
AssetBrowser-->filterTree.clearSelection();
%newModuleItem = AssetBrowser-->filterTree.findItemByName(AssetBrowser.newModuleId);
AssetBrowser-->filterTree.selectItem(%newModuleItem);
AssetBrowser.newModuleId = "";
}
2021-08-14 03:27:12 +00:00
//%dataItem = AssetBrowser-->filterTree.findItemByName("data");
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 07:47:28 +00:00
//AssetBrowser-->filterTree.expandItem(%dataItem);
2019-10-20 07:47:15 +00:00
2019-12-03 06:09:18 +00:00
AssetBrowser.dirHandler.expandTreeToAddress(AssetBrowser.dirHandler.currentAddress);
2019-10-20 07:47:15 +00:00
2019-12-03 06:09:18 +00:00
%selectedItem = AssetBrowser.dirHandler.getFolderTreeItemFromAddress(AssetBrowser.dirHandler.currentAddress);
2018-01-28 21:30:17 +00:00
AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
2019-05-04 16:49:42 +00: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 07:47:28 +00:00
AssetBrowser-->filterTree.buildVisibleTree(true);
2018-01-28 21:30:17 +00:00
2019-12-03 06:09:18 +00:00
AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
function AssetBrowser::updateSelection( %this, %asset, %moduleName )
{
2020-09-02 06:26:43 +00:00
//If we had an existing selected assetDef, clear the reference
if(isObject(AssetBrowser.selectedAssetDef))
AssetDatabase.releaseAsset(AssetBrowser.selectedAssetDef.getAssetId());
//AssetBrowser.selectedMaterial = %asset;
2018-01-28 21:30:17 +00:00
AssetBrowser.selectedAsset = %moduleName@":"@%asset;
2020-09-02 06:26:43 +00:00
//If it's got slashes, it's a path so it's actually a folder item, not an asset
if(strstr(%moduleName, "/") != -1)
return;
2022-03-29 06:40:07 +00:00
//Check if this is an actual assetId, or if it's just a programmatic reference
//like what we use for the creator entries
if(AssetDatabase.isDeclaredAsset(AssetBrowser.selectedAsset))
{
//Looks good, it's an asset so we'll select the definition while we're at it
2018-01-28 21:30:17 +00:00
AssetBrowser.selectedAssetDef = AssetDatabase.acquireAsset(AssetBrowser.selectedAsset);
2022-03-29 06:40:07 +00:00
}
2018-01-28 21:30:17 +00:00
}
2020-07-11 21:49:06 +00:00
function AssetBrowser::loadCollectionSets(%this)
{
//Process any datablocks and populate their lists categories as tags as well
%collectionsItem = AssetBrowser-->filterTree.collectionsIdx;
%collectionsCount = AssetBrowserCollectionSets.value("CollectionSetCount", 0);
for ( %i = 0; %i < %collectionsCount; %i++ )
{
%collection = AssetBrowserCollectionSets.value("Collection"@%i, "");
%collectionName = getField(%collection, 0);
%collectionTerm = getField(%collection, 1);
AssetBrowser-->filterTree.insertItem(%collectionsItem, %collectionName, %collectionTerm);
}
}
function AssetBrowser::setCollectionSetActive(%this, %collectionSet)
{
AssetBrowserSearchFilter.setText(%collectionSet);
AssetBrowserSearchFilter.onReturn();
}
function AssetBrowser::loadTags(%this)
{
//Process any datablocks and populate their lists categories as tags as well
%dataGroup = "DataBlockGroup";
%tagItem = AssetBrowser-->filterTree.tagsIdx;
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
{
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
if ( %obj.category $= "" && %obj.category == 0 )
continue;
%tagChildItem = AssetBrowser-->filterTree.findChildItemByName(%tagItem, %obj.category);
if(%tagChildItem == 0)
{
//Didn't already exist, so register it in
AssetBrowser-->filterTree.insertItem(%tagItem, %obj.category);
}
}
}
function AssetBrowser::setTagActive(%this, %tag)
{
%found = false;
for(%i=0; %i < AssetSearchTerms.count(); %i++)
{
%action = AssetSearchTerms.getKey(%i);
%word = AssetSearchTerms.getValue(%i);
if(%action $= "tag" && %word $= %tag)
{
//If we found it, we just remove it from our list, toggling it off
AssetSearchTerms.erase(%i);
%found = true;
}
}
//If we didn't find it, we're going to add it into our list
if(!%found)
{
AssetSearchTerms.add("tag", %tag);
}
%this.updateSearchTextFromFilter();
%this.rebuildAssetArray();
}
2018-01-28 21:30:17 +00:00
//
//needs to be deleted with the persistence manager and needs to be blanked out of the matmanager
//also need to update instances... i guess which is the tricky part....
function AssetBrowser::showDeleteDialog( %this )
{
2020-09-02 06:26:43 +00:00
%material = AssetBrowser.selectedAsset;
2018-01-28 21:30:17 +00:00
%secondFilter = "MaterialFilterMappedArray";
%secondFilterName = "Mapped";
for( %i = 0; %i < MaterialFilterUnmappedArray.count(); %i++ )
{
if( MaterialFilterUnmappedArray.getValue(%i) $= %material )
{
%secondFilter = "MaterialFilterUnmappedArray";
%secondFilterName = "Unmapped";
break;
}
}
if( isObject( %material ) )
{
2020-07-24 05:40:03 +00:00
toolsMessageBoxYesNoCancel("Delete Material?",
2018-01-28 21:30:17 +00:00
"Are you sure you want to delete<br><br>" @ %material.getName() @ "<br><br> Material deletion won't take affect until the engine is quit.",
"AssetBrowser.deleteMaterial( " @ %material @ ", " @ %secondFilter @ ", " @ %secondFilterName @" );",
"",
"" );
}
}
function AssetBrowser::deleteMaterial( %this, %materialName, %secondFilter, %secondFilterName )
{
if( !isObject( %materialName ) )
return;
for( %i = 0; %i <= MaterialFilterAllArray.countValue( %materialName ); %i++)
{
%index = MaterialFilterAllArray.getIndexFromValue( %materialName );
MaterialFilterAllArray.erase( %index );
}
MaterialFilterAllArrayCheckbox.setText("All ( " @ MaterialFilterAllArray.count() - 1 @ " ) ");
%checkbox = %secondFilter @ "Checkbox";
for( %k = 0; %k <= %secondFilter.countValue( %materialName ); %k++)
{
%index = %secondFilter.getIndexFromValue( %materialName );
%secondFilter.erase( %index );
}
%checkbox.setText( %secondFilterName @ " ( " @ %secondFilter.count() - 1 @ " ) ");
for( %i = 0; %materialName.getFieldValue("materialTag" @ %i) !$= ""; %i++ )
{
%materialTag = %materialName.getFieldValue("materialTag" @ %i);
for( %j = AssetBrowser.staticFilterObjects; %j < AssetBrowser-->filterArray.getCount() ; %j++ )
{
if( %materialTag $= AssetBrowser-->filterArray.getObject(%j).getObject(0).filter )
{
%count = getWord( AssetBrowser-->filterArray.getObject(%j).getObject(0).getText(), 2 );
%count--;
AssetBrowser-->filterArray.getObject(%j).getObject(0).setText( %materialTag @ " ( "@ %count @ " )");
}
}
}
UnlistedMaterials.add( "unlistedMaterials", %materialName );
if( %materialName.getFilename() !$= "" &&
%materialName.getFilename() !$= "tools/gui/AssetBrowser.ed.gui" &&
2020-12-12 15:54:16 +00:00
%materialName.getFilename() !$= "tools/materialEditor/scripts/materialEditor.ed." @ $TorqueScriptFileExtension )
2018-01-28 21:30:17 +00:00
{
AssetBrowserPerMan.removeObjectFromFile(%materialName);
AssetBrowserPerMan.saveDirty();
}
2022-03-27 08:05:48 +00:00
AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
function AssetBrowser::toggleTagFilterPopup(%this)
{
if(TagFilterWindow.visible)
TagFilterWindow.visible = false;
else
TagFilterWindow.visible = true;
return;
%assetQuery = new AssetQuery();
%numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
for( %i=0; %i < %numAssetsFound; %i++)
{
%assetId = %assetQuery.getAsset(%i);
//first, get the asset's module, as our major categories
%module = AssetDatabase.getAssetModule(%assetId);
%moduleName = %module.moduleId;
//check that we don't re-add it
%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
if(%moduleItemId == -1 || %moduleItemId == 0)
2019-12-03 06:09:18 +00:00
%moduleItemId = AssetBrowser-->filterTree.insertItem(1, %module.moduleId, "", "", 1, 2);
2018-01-28 21:30:17 +00:00
//now, add the asset's category
%assetType = AssetDatabase.getAssetCategory(%assetId);
2021-05-05 02:49:19 +00:00
// TODO?
%text = "";
%var = "";
%cmd = "";
%textLength = strlen(%text);
// end todo
2018-01-28 21:30:17 +00:00
%checkBox = new GuiCheckBoxCtrl()
{
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "ToolsGuiCheckBoxListProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = (%textLength * 4) @ " 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Variable = %var;
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
text = %text;
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
useInactiveState = "0";
Command = %cmd;
};
TagFilterList.add(%checkBox);
}
}
function AssetBrowser::changeAsset(%this)
{
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
%targetObject = %this.fieldTargetObject;
%inspectorObject = "";
if(%this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector"))
{
%inspectorObject = %this.fieldTargetObject;
%targetObject = %inspectorObject.getInspectObject();
}
2018-01-28 21:30:17 +00:00
//alright, we've selectd an asset for a field, so time to set it!
2021-01-03 14:58:53 +00:00
if(%this.fieldTargetName $= "")
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
%cmd = %targetObject @ ".apply(\""@ %this.selectedAsset @ "\");";
2021-01-03 14:58:53 +00:00
else
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
%cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
//echo("Changing asset via the " @ %cmd @ " command");
2018-01-28 21:30:17 +00:00
eval(%cmd);
2019-05-04 16:49:42 +00:00
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
//Force update our object with the field change
%targetObject.inspectPostApply();
if(isObject(%inspectorObject))
{
%inspectorObject.refresh();
}
2019-05-04 16:49:42 +00:00
//Flag us as dirty for editing purposes
EWorldEditor.setSceneAsDirty();
2018-01-28 21:30:17 +00:00
}
function AssetBrowser::reImportAsset(%this)
{
//Find out what type it is
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%assetType = AssetDatabase.getAssetType(EditAssetPopup.assetId);
if(%assetType $= "ShapeAsset" || %assetType $= "ImageAsset" || %assetType $= "SoundAsset")
{
AssetBrowser.isAssetReImport = true;
AssetBrowser.reImportingAssetId = EditAssetPopup.assetId;
2019-05-04 16:49:42 +00:00
%reimportingPath = %assetDef.originalFilePath;
//first, double-check we have an originating file. if we don't then we need to basically go out looking for it
if(!isFile(%assetDef.originalFilePath))
{
//if(%assetType $= "ImageAsset")
// %filters = "";
2021-05-05 02:49:19 +00:00
//TODO
%currentFile = "";
2019-05-04 16:49:42 +00:00
%dlg = new OpenFileDialog()
{
Filters = "(All Files (*.*)|*.*|";
DefaultFile = %currentFile;
ChangePath = false;
MustExist = true;
MultipleFiles = false;
forceRelativePath = false;
};
if ( %dlg.Execute() )
{
%reimportingPath = %dlg.FileName;
}
%dlg.delete();
}
2018-01-28 21:30:17 +00:00
AssetBrowser.onBeginDropFiles();
2019-05-04 16:49:42 +00:00
AssetBrowser.onDropFile(%reimportingPath);
2018-01-28 21:30:17 +00:00
AssetBrowser.onEndDropFiles();
%module = AssetDatabase.getAssetModule(EditAssetPopup.assetId);
//get the selected module data
ImportAssetModuleList.setText(%module.ModuleId);
}
}
2019-10-20 07:47:15 +00:00
//
//
// RMB context popups
2020-07-11 21:49:06 +00:00
function AssetBrowserPreviewButton::onRightClick(%this)
2018-01-28 21:30:17 +00:00
{
2020-07-11 21:49:06 +00:00
AssetBrowser.selectedAssetPreview = %this;
EditAssetPopup.assetId = %this.moduleName @ ":" @ %this.assetName;
EditAssetPopup.assetType = %this.assetType;
%assetType = %this.assetType;
2018-01-28 21:30:17 +00:00
//Do some enabling/disabling of options depending on asset type
EditAssetPopup.enableItem(0, true);
2022-04-04 01:00:30 +00:00
EditAssetPopup.enableItem(9, true);
2018-01-28 21:30:17 +00:00
//Is it an editable type?
2021-09-04 07:27:21 +00:00
if(%assetType $= "ImageAsset" /*|| %assetType $= "GameObjectAsset"*/ || %assetType $= "CppAsset")
2018-01-28 21:30:17 +00:00
{
EditAssetPopup.enableItem(0, false);
}
//Is it an importable type?
if(%assetType $= "GameObjectAsset" || %assetType $= "ComponentAsset" || %assetType $= "GUIAsset" || %assetType $= "LevelAsset"
|| %assetType $= "MaterialAsset" || %assetType $= "ParticleAsset" || %assetType $= "PostEffectAsset" || %assetType $= "ScriptAsset"
|| %assetType $= "StateMachineAsset")
{
2022-04-04 01:00:30 +00:00
EditAssetPopup.enableItem(9, false);
2018-01-28 21:30:17 +00:00
}
2022-04-04 01:00:30 +00:00
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
if(%assetDef.originalFilePath $= "" || !isFile(%assetDef.originalFilePath))
{
//if we have no noted original import file path or it's invalid
//we can't reimport either
EditAssetPopup.enableItem(9, false);
}
AssetDatabase.releaseAsset(EditAssetPopup.assetId);
2019-05-04 16:49:42 +00:00
if(%assetType $= "LevelAsset")
2020-12-29 05:43:56 +00:00
{
2019-05-04 16:49:42 +00:00
EditLevelAssetPopup.showPopup(Canvas);
2020-12-29 05:43:56 +00:00
}
2019-10-20 07:47:15 +00:00
else if(%assetType $= "Folder")
2019-12-03 06:09:18 +00:00
{
2020-07-11 21:49:06 +00:00
EditFolderPopup.dirPath = %this.moduleName @ "/" @ %this.assetName;
2019-10-20 07:47:15 +00:00
EditFolderPopup.showPopup(Canvas);
2019-12-03 06:09:18 +00:00
}
2020-12-29 05:43:56 +00:00
else if(%assetType $= "TerrainAsset")
{
EditTerrainAssetPopup.showPopup(Canvas);
}
2019-05-04 16:49:42 +00:00
else
2020-12-29 05:43:56 +00:00
{
2019-05-04 16:49:42 +00:00
EditAssetPopup.showPopup(Canvas);
2020-12-29 05:43:56 +00:00
}
2019-10-20 07:47:15 +00:00
if(%assetType $= "Folder")
{
2020-07-11 21:49:06 +00:00
EditAssetPopup.assetId = %this.moduleName @ "/" @ %this.assetName;
2019-10-20 07:47:15 +00:00
}
2018-01-28 21:30:17 +00:00
}
2019-10-20 07:47:15 +00:00
//function AssetListPanel::onRightMouseDown(%this)
function AssetListPanelInputs::onRightMouseDown(%this)
2018-01-28 21:30:17 +00:00
{
AddNewAssetPopup.showPopup(Canvas);
}
2019-10-20 07:47:15 +00:00
function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
{
2019-11-18 09:30:04 +00:00
%count = %this.getSelectedItemsCount();
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 07:47:28 +00:00
%itemText = %this.getItemText(%itemId);
2020-07-11 21:49:06 +00:00
%parentItem = %this.getParentItem(%itemId);
if(%parentItem == %this.tagsIdx)
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
}
else if(%parentItem == %this.collectionsIdx)
{
EditCollectionSets.showPopup(Canvas);
AssetBrowser.selectedCollectionSet = %itemText;
}
else if(%parentItem == %this.creatorIdx)
{
}
else
{
2021-08-14 03:27:12 +00:00
if( %this.getSelectedItemsCount() > 0 && (%itemText !$= "data" && %itemText !$="core" && %itemText !$= "tools"))
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
//AddNewAssetPopup.showPopup(Canvas);
//We have something clicked, so figure out if it's a sub-filter or a module filter, then push the correct
//popup menu
%parentItem = %this.getParentItem(%itemId);
2021-08-14 03:27:12 +00:00
if(%this.getItemText(%parentItem) $= "data") //if it's a data module, continue
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 07:47:28 +00:00
{
2020-07-11 21:49:06 +00:00
//find out if it's a folder or a module!
if(ModuleDatabase.findModule(%itemText))
{
//yep, module, push the all-inclusive popup
EditModulePopup.showPopup(Canvas);
//also set the module value for creation info
AssetBrowser.selectedModule = %itemText;
}
else
{
EditNonModulePopup.showPopup(Canvas);
EditNonModulePopup.targetFolder = %itemText;
}
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 07:47:28 +00:00
}
else
{
2020-07-11 21:49:06 +00:00
EditFolderPopup.showPopup(Canvas);
EditFolderPopup.assetType = "Folder";
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 07:47:28 +00:00
}
2019-10-20 07:47:15 +00:00
}
2021-08-14 03:27:12 +00:00
else if(%itemText $= "data")
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
AddNewModulePopup.showPopup(Canvas);
}
2021-08-14 03:27:12 +00:00
else if(%itemText $= "tools")
2020-07-11 21:49:06 +00:00
{
AddNewToolPopup.showPopup(Canvas);
2019-10-20 07:47:15 +00: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 07:47:28 +00:00
}
2019-10-20 07:47:15 +00:00
}
//
//
//
2020-08-07 05:24:26 +00:00
function AssetBrowser::openAssetSettings(%this)
2020-07-11 21:49:06 +00:00
{
2020-08-07 05:24:26 +00:00
ESettingsWindow.toggleEditorSettings();
%assetEditIndex = ESettingsWindowList.findTextIndex("Asset Editing");
ESettingsWindowList.setSelectedRow( %assetEditIndex );
2020-07-11 21:49:06 +00:00
}
2022-04-06 06:08:20 +00:00
function ESettingsWindow::getAssetManagementSettings(%this)
{
SettingsInspector.startGroup("Modules");
SettingsInspector.addSettingsField("AssetManagement/Modules/coreModulePath", "Core Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/gameDataModulePath", "Game Data Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/moduleExtension", "Module Extension", "string", "");
%moduleList = ModuleDatabase.findModules(true);
%moduleList = strreplace(%moduleList, " ", ",");
SettingsInspector.addSettingsField("AssetManagement/Modules/DefaultModule", "Default Module", "list", %moduleList);
SettingsInspector.endGroup();
SettingsInspector.startGroup("Assets");
SettingsInspector.addSettingsField("AssetManagement/Assets/assetExtension", "Asset Extension", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/datablockCaching", "Cache Datablocks", "bool", "");
//SettingsInspector.addSettingsField("AssetManagement/Assets/moduleExtension", "Module Extension", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getAssetEditingSettings(%this)
{
ImportAssetWindow::reloadImportOptionConfigs();
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%formattedModuleList = "";
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%module = getWord(%moduleList, %i);
if(%module.group !$= "Tools" && %module.group !$= "Core")
{
if(%formattedModuleList $= "")
%formattedModuleList = %module.moduleId;
else
%formattedModuleList = %formattedModuleList @ "," @ %module.moduleId;
}
}
SettingsInspector.startGroup("Asset Creation");
SettingsInspector.addSettingsField("Assets/New/defaultModule", "Default Module", "list", "Default Module for new assets to be created into", %formattedModuleList);
SettingsInspector.addSettingsField("Assets/New/alwaysPromptModuleTarget", "Always Prompt Target Module", "bool", "If off, use the default module");
SettingsInspector.endGroup();
%formattedConfigList = "";
for(%i=0; %i < ImportAssetWindow.importConfigsList.Count(); %i++)
{
%configName = ImportAssetWindow.importConfigsList.getKey(%i);
%formattedConfigList = %i == 0 ? %configName : %formattedConfigList @ "," @ %configName;
}
SettingsInspector.startGroup("Assets Importing");
SettingsInspector.addField("Edit Import Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
"will attempt to automatically import any inbound assets"@
"using the default config, without prompting the import window."@
"The window will still display if any issues are detected", "");
SettingsInspector.addSettingsField("Assets/AutoImportLooseFiles", "Automatically Import Loose Files", "bool", "If on, will automatically import unassociated loose files in assets when navigating the Asset Browser.", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Asset Browser");
SettingsInspector.addSettingsField("Assets/Browser/showCoreModule", "Show Core Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showToolsModule", "Show Tools Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showOnlyPopulatedModule", "Show Only Modules with Assets in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showFolders", "Show Folders in Tiles view in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showEmptyFolders", "Show Empty Folders in Tiles view in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showLooseFiles", "Show Loose Files when viewing in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/promptOnRename", "Prompt on Rename", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/doubleClickAction", "Double Click Action", "list", "Dictates what sort of action double clicking on an asset in the Browser will invoke", "Edit Asset,Spawn Asset");
SettingsInspector.addSettingsField("AssetManagement/Assets/closeBrowserOnDragAction", "Close Browser on Drag Action", "bool", "If on, the Asset Browser will automatically close after dragging an asset from it to the editor interface.");
SettingsInspector.endGroup();
}
//
//
//
2019-10-20 07:47:15 +00:00
function AssetBrowser::showVisibiltyOptions(%this)
{
BrowserVisibilityPopup.showPopup(Canvas);
}
2020-07-11 21:49:06 +00:00
function AssetBrowser::saveCurrentFiltersAsCollection(%this)
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
%colSetName = CreateNewCollectionSetCtrl-->collectionSetName.getText();
if(%colSetName $= "")
{
error("Collection Sets require a name!");
}
2019-10-20 07:47:15 +00:00
2020-07-11 21:49:06 +00:00
%collectionsCount = AssetBrowserCollectionSets.value("CollectionSetCount", 0);
%collectionsCount += 1;
AssetBrowserCollectionSets.setValue("CollectionSetCount", %collectionsCount);
%collection = %colSetName TAB AssetBrowserSearchFilter.getText();
AssetBrowserCollectionSets.setValue("Collection"@%collectionsCount-1, %collection);
%success = AssetBrowserCollectionSets.write();
AssetBrowser.loadDirectories();
2019-10-20 07:47:15 +00:00
}
2020-07-11 21:49:06 +00:00
function AssetBrowser::deleteCollectionSet(%this)
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
%collectionsCount = AssetBrowserCollectionSets.value("CollectionSetCount", 0);
%tempCollectionListCount = 0;
2019-10-20 07:47:15 +00:00
2020-07-11 21:49:06 +00:00
%found = false;
for ( %i = 0; %i < %collectionsCount; %i++ )
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
%collection = AssetBrowserCollectionSets.value("Collection"@%i, "");
%collectionName = getField(%collection, 0);
%collectionTerm = getField(%collection, 1);
if(AssetBrowser.selectedCollectionSet !$= %collectionName)
{
%tempCollectionList[%tempCollectionListCount] = %collection;
%tempCollectionListCount++;
}
2019-10-20 07:47:15 +00:00
}
2020-07-11 21:49:06 +00:00
AssetBrowserCollectionSets.setValue("CollectionSetCount", %tempCollectionListCount);
for(%i=0; %i < %collectionsCount; %i++)
2019-10-20 07:47:15 +00:00
{
2020-07-11 21:49:06 +00:00
if(%i < %tempCollectionListCount)
AssetBrowserCollectionSets.setValue("Collection"@%i, %tempCollectionList[%i]);
else
AssetBrowserCollectionSets.remove("Collection"@%i);
2019-10-20 07:47:15 +00:00
}
2020-07-11 21:49:06 +00:00
AssetBrowserCollectionSets.write();
%this.loadDirectories();
2019-10-20 07:47:15 +00:00
}
2018-01-28 21:30:17 +00:00
function AssetBrowser::refreshPreviews(%this)
{
AssetBrowserFilterTree.onSelect(AssetBrowser.selectedItem);
}
function AssetBrowserFilterTree::onSelect(%this, %itemId)
{
if(%itemId == 1)
//can't select root
return;
2020-07-11 21:49:06 +00:00
//process special cases
%parentItem = %this.getParentItem(%itemId);
if(%parentItem == %this.tagsIdx)
{
//we selected a tag, so deal with that
AssetBrowser.setTagActive(%this.getItemText(%itemId));
}
else if(%parentItem == %this.collectionsIdx)
{
//A collection set was selected
AssetBrowser.setCollectionSetActive(%this.getItemValue(%itemId));
}
else if(%parentItem == %this.creatorIdx)
{
2021-01-24 10:33:28 +00:00
%name = %this.getItemText(%itemId);
AssetBrowser.dirHandler.currentAddress = "Creator/" @ %name;
AssetBrowser.rebuildAssetArray();
AssetBrowser.refresh();
2020-07-11 21:49:06 +00:00
}
2018-01-28 21:30:17 +00:00
else
2020-07-11 21:49:06 +00:00
{
//Make sure we have an actual module selected!
%parentId = %this.getParentItem(%itemId);
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
%name = %this.getItemText(%itemId);
2019-11-24 12:52:34 +00:00
2020-07-11 21:49:06 +00:00
%breadcrumbPath = %this.getItemValue(%itemId);
if(%breadcrumbPath !$= "")
%breadcrumbPath = %breadcrumbPath @ "/" @ %this.getItemText(%itemId);
else
%breadcrumbPath = %this.getItemText(%itemId);
if(%breadcrumbPath $= "")
%breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
AssetBrowser.navigateTo(%breadcrumbPath);
}
2019-10-20 07:47:15 +00:00
}
2021-01-24 10:33:28 +00:00
function AssetBrowserFilterTree::hasAsParent(%this, %itemId, %text)
{
%parentId = %this.getParentItem(%itemId);
while(%parentId != 0)
{
%parentText = %this.getItemText(%parentId);
if(%parentText $= %text)
return true;
%parentId = %this.getParentItem(%parentId);
}
return false;
}
2019-10-20 07:47:15 +00:00
function AssetBrowser::rebuildAssetArray(%this)
{
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 07:47:28 +00:00
if(!%this.previewArrayDirty)
{
%this.previewArrayDirty = true;
%this.schedule(16, "doRebuildAssetArray");
}
}
function AssetBrowser::doRebuildAssetArray(%this)
{
if(!%this.previewArrayDirty)
return;
2019-12-03 06:09:18 +00:00
%breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
2019-10-20 07:47:15 +00:00
2018-01-28 21:30:17 +00:00
// we have to empty out the list; so when we create new guicontrols, these dont linger
2019-10-20 07:47:15 +00:00
AssetBrowser-->assetList.deleteAllObjects();
2018-01-28 21:30:17 +00:00
AssetPreviewArray.empty();
2021-08-30 06:50:47 +00:00
if(isObject($AssetBrowser::AssetArray))
$AssetBrowser::AssetArray.delete();
2020-04-15 17:15:12 +00:00
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray = new ArrayObject();
2019-10-20 07:47:15 +00:00
2018-01-28 21:30:17 +00:00
//First, Query for our assets
%assetQuery = new AssetQuery();
%numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
2019-11-24 12:52:34 +00:00
%finalAssetCount = 0;
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 07:47:28 +00:00
2018-01-28 21:30:17 +00:00
//now, we'll iterate through, and find the assets that are in this module, and this category
for( %i=0; %i < %numAssetsFound; %i++)
{
%assetId = %assetQuery.getAsset(%i);
2019-10-20 07:47:15 +00:00
%assetPath = makeRelativePath(AssetDatabase.getAssetFilePath(%assetId));
%assetBasePath = filePath(%assetPath);
//clean up the path
%assetBasePath = strreplace(%assetBasePath, "//", "/");
2020-07-11 21:49:06 +00:00
%searchActive = AssetSearchTerms.count() != 0;
if(%assetBasePath $= %breadcrumbPath || (%searchActive && startsWith(%assetBasePath,%breadcrumbPath)))
2019-10-20 07:47:15 +00:00
{
//first, get the asset's module, as our major categories
%module = AssetDatabase.getAssetModule(%assetId);
%moduleName = %module.moduleId;
//it's good, so test that the category is right!
2018-01-28 21:30:17 +00:00
%assetType = AssetDatabase.getAssetCategory(%assetId);
if(%assetType $= "")
{
%assetType = AssetDatabase.getAssetType(%assetId);
}
2020-07-11 21:49:06 +00:00
//stop adding after previewsPerPage is hit
%assetName = AssetDatabase.getAssetName(%assetId);
if(%searchActive)
{
if(matchesSearch(%assetName, %assetType))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %moduleName, %assetId);
2020-07-11 21:49:06 +00:00
if(%assetType !$= "Folder")
%finalAssetCount++;
continue;
}
}
else
{
2020-08-09 06:32:27 +00:00
if(AssetBrowser.assetTypeFilter !$= "")
{
if(AssetBrowser.assetTypeFilter $= %assetType)
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %moduleName, %assetId );
2020-08-09 06:32:27 +00:00
if(%assetType !$= "Folder")
%finalAssetCount++;
}
}
else
{
//got it.
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %moduleName, %assetId );
2020-08-09 06:32:27 +00:00
if(%assetType !$= "Folder")
%finalAssetCount++;
}
2020-07-11 21:49:06 +00:00
}
}
2018-01-28 21:30:17 +00:00
}
2019-10-20 07:47:15 +00:00
//Add folders
if(EditorSettings.value("Assets/Browser/showFolders", true) == true)
2018-01-28 21:30:17 +00:00
{
2019-10-20 07:47:15 +00:00
%folders = getDirectoryList(%breadcrumbPath);
for(%f=0; %f < getFieldCount(%folders); %f++)
2018-01-28 21:30:17 +00:00
{
2019-10-20 07:47:15 +00:00
%folderName = getField(%folders, %f);
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
2018-01-28 21:30:17 +00:00
{
2020-07-11 21:49:06 +00:00
if(matchesSearch(%folderName, "Folder", ""))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
2020-07-11 21:49:06 +00:00
continue;
}
2018-01-28 21:30:17 +00:00
}
2019-10-20 07:47:15 +00:00
else
2018-01-28 21:30:17 +00:00
{
2019-10-20 07:47:15 +00:00
//got it.
2020-08-08 18:01:50 +00:00
if(%folderName $= "shaderCache" || %folderName $= "cache" || %folderName $= ".git")
continue;
if(!%this.coreModulesFilter && %folderName $= "core" && %breadcrumbPath $= "")
continue;
if(!%this.toolsModulesFilter && %folderName $= "tools" && %breadcrumbPath $= "")
continue;
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
2018-01-28 21:30:17 +00:00
}
}
}
2019-10-20 07:47:15 +00: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 07:47:28 +00:00
//Add Non-Asset Scripted Objects. Datablock, etc based
2021-09-10 07:13:56 +00:00
if(AssetBrowser.assetTypeFilter $= "" && %breadcrumbPath !$= "" && isDirectory(%breadcrumbPath))
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 07:47:28 +00:00
{
2020-08-12 18:11:13 +00:00
%category = getWord( %breadcrumbPath, 1 );
%dataGroup = "DataBlockGroup";
2020-04-15 17:15:12 +00:00
2020-08-12 18:11:13 +00:00
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
%obj = %dataGroup.getObject(%i);
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
//if ( %obj.category $= "" && %obj.category == 0 )
// continue;
%dbFilename = %obj.getFileName();
%dbFilePath = filePath(%dbFilename);
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
if(startsWith(%dbFilePath, %breadcrumbPath))
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
%dbName = %obj.getName();
if(matchesSearch(%dbName, "Datablock"))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %dbFilename, "Datablock" TAB %dbName );
2020-08-12 18:11:13 +00:00
}
}
2020-07-11 21:49:06 +00:00
}
2020-08-12 18:11:13 +00:00
else if(%dbFilePath $= %breadcrumbPath)
2020-04-15 17:15:12 +00:00
{
2020-08-12 18:11:13 +00:00
%dbName = %obj.getName();
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %dbFilename, "Datablock" TAB %dbName );
2020-08-12 18:11:13 +00:00
/*%catItem = AssetBrowser-->filterTree.findItemByName(%obj.category);
if(%catItem == 0)
AssetBrowser-->filterTree.insertItem(%scriptedItem, %obj.category, "scripted");*/
/*%ctrl = %this.findIconCtrl( %obj.category );
if ( %ctrl == -1 )
{
%this.addFolderIcon( %obj.category );
}*/
}
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 07:47:28 +00:00
}
2020-07-11 21:49:06 +00:00
2020-08-12 18:11:13 +00:00
%this.getLooseFilesInDir();
2020-07-11 21:49:06 +00:00
2020-08-12 18:11:13 +00:00
%looseFiles = ABLooseFileArray.count();
for( %i=0; %i < %looseFiles; %i++)
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
%looseFileFullPath = ABLooseFileArray.getKey(%i);
%looseFilePath = filePath(%looseFileFullPath);
%looseFileName = fileName(%looseFileFullPath);
2021-01-02 07:58:15 +00:00
%looseFileExt = fileExt(%looseFileFullPath);
2020-08-12 18:11:13 +00:00
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %looseFilePath, "LooseFile" TAB %looseFileName );
2020-08-12 18:11:13 +00:00
}
//Prefabs
%expr = "*.prefab";
%fullPrefabPath = findFirstFile( %breadcrumbPath @ "/" @ %expr );
while ( %fullPrefabPath !$= "" )
{
%prefabPath = filePath(%fullPrefabPath);
%prefabName = fileName(%fullPrefabPath);
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
if(startsWith(%prefabPath, %breadcrumbPath))
2020-07-11 21:49:06 +00:00
{
2020-08-12 18:11:13 +00:00
if(matchesSearch(%prefabName, "Prefab"))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %prefabPath, "Prefab" TAB %prefabName );
2020-08-12 18:11:13 +00:00
}
}
}
else if(%prefabPath $= %breadcrumbPath)
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %prefabPath, "Prefab" TAB %prefabName );
2020-07-11 21:49:06 +00:00
}
2020-08-12 18:11:13 +00:00
%fullPrefabPath = findNextFile( %breadcrumbPath @ "/" @ %expr );
}
2021-01-02 07:58:15 +00:00
//C++ files
%cppPattern = %breadcrumbPath @ "/" @ "*.cpp";
for (%fullCppPath = findFirstFile(%cppPattern); %fullCppPath !$= ""; %fullCppPath = findNextFile(%cppPattern))
{
%cppPath = filePath(%fullCppPath);
%cppName = fileName(%fullCppPath);
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
{
if(startsWith(%cppPath, %breadcrumbPath))
{
if(matchesSearch(%cppName, "Cpp"))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %cppPath, "Cpp" TAB %cppName );
2021-01-02 07:58:15 +00:00
}
}
}
else if(%cppPath $= %breadcrumbPath)
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %cppPath, "Cpp" TAB %cppName );
2021-01-02 07:58:15 +00:00
}
}
//C++ Header files
%cppPattern = %breadcrumbPath @ "/" @ "*.h";
for (%fullCppPath = findFirstFile(%cppPattern); %fullCppPath !$= ""; %fullCppPath = findNextFile(%cppPattern))
{
%cppPath = filePath(%fullCppPath);
%cppName = fileName(%fullCppPath);
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
{
if(startsWith(%cppPath, %breadcrumbPath))
{
if(matchesSearch(%cppName, "Cpp"))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %cppPath, "Cpp" TAB %cppName );
2021-01-02 07:58:15 +00:00
}
}
}
else if(%cppPath $= %breadcrumbPath)
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %cppPath, "Cpp" TAB %cppName );
2021-01-02 07:58:15 +00:00
}
}
//script files
%tscriptPattern = %breadcrumbPath @ "/" @ "*.tscript";
for (%fullScriptPath = findFirstFile(%tscriptPattern); %fullScriptPath !$= ""; %fullScriptPath = findNextFile(%tscriptPattern))
{
2021-02-21 08:16:34 +00:00
//If it's associated to an asset, we'll want to do extra checks
%assetQuery = new AssetQuery();
%foundAssets = AssetDatabase.findAssetLooseFile(%assetQuery, %fullScriptPath);
if(%foundAssets != 0)
{
%doSkip = false;
%count = %assetQuery.getCount();
for(%i=0; %i < %count; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%foundAssetType = AssetDatabase.getAssetType(%assetId);
if(%foundAssetType !$= "ScriptAsset" && %foundAssetType !$= "GUIAsset")
{
%doSkip = true;
break;
}
}
if(%doSkip)
continue;
}
2021-01-02 07:58:15 +00:00
%tscriptPath = filePath(%fullScriptPath);
%tscriptName = fileName(%fullScriptPath);
%searchActive = AssetSearchTerms.count() != 0;
if(%searchActive)
{
if(startsWith(%tscriptPath, %breadcrumbPath))
{
if(matchesSearch(%tscriptName, "tscript"))
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %tscriptPath, "tscript" TAB %tscriptName );
2021-01-02 07:58:15 +00:00
}
}
}
else if(%tscriptPath $= %breadcrumbPath)
{
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %tscriptPath, "tscript" TAB %tscriptName );
2021-01-02 07:58:15 +00:00
}
}
2020-07-11 21:49:06 +00:00
}
2019-10-20 07:47:15 +00:00
2021-01-24 10:33:28 +00:00
//If we've selected into the Creator section, we have special handling for that
if(startsWith(%breadcrumbPath, "Creator"))
{
//One of the creator folders was selected
%creatorGroup = AssetBrowserFilterTree.getItemText(AssetBrowserFilterTree.getSelectedItem(0));
2021-09-10 07:13:56 +00:00
if(%creatorGroup $= "Creator")
{
//add folders for the groups
%placeholderVar = "";
}
else
{
2021-01-24 10:33:28 +00:00
for ( %i = 0; %i < AssetBrowser.creatorClassArray.count(); %i++ )
{
%group = AssetBrowser.creatorClassArray.getKey( %i );
2021-09-10 07:13:56 +00:00
//Do some filter logic do skip out of groups if we're in the wrong editor mode for it
%creatorEditorFilter = "WorldEditor";
if(GuiEditorIsActive())
{
%creatorEditorFilter = "GuiEditor";
}
%creatorGroupIndex = AssetBrowserCreatorGroupsList.getIndexFromValue(%group);
%creatorGroupKey = AssetBrowserCreatorGroupsList.getKey(%creatorGroupIndex);
if ( %group $= %creatorGroup && %creatorGroupKey $= %creatorEditorFilter )
2021-01-24 10:33:28 +00:00
{
%creatorObj = AssetBrowser.creatorClassArray.getValue( %i );
%class = %creatorObj.val[0];
%name = %creatorObj.val[1];
%func = %creatorObj.val[2];
2021-08-30 06:50:47 +00:00
$AssetBrowser::AssetArray.add( %name, "Creator" TAB %creatorObj );
2021-01-24 10:33:28 +00:00
}
}
}
2021-09-10 07:13:56 +00:00
}
2021-01-24 10:33:28 +00:00
2021-08-30 06:50:47 +00:00
for(%i=0; %i < $AssetBrowser::AssetArray.count(); %i++)
AssetBrowser.buildAssetPreview( $AssetBrowser::AssetArray.getValue(%i), $AssetBrowser::AssetArray.getKey(%i) );
2022-04-23 21:07:36 +00:00
//Queue population of any non-Type Card preview images
AssetBrowser.schedule(32, "populatePreviewImages");
2019-10-20 07:47:15 +00:00
2019-11-24 12:52:34 +00:00
AssetBrowser_FooterText.text = %finalAssetCount @ " Assets";
%activeTypeFilterList = "";
if(AssetBrowser.assetTypeFilter $= "")
{
if(!AssetTypeListPopup.isItemChecked(0))
{
for(%f=1; %f < AssetFilterTypeList.Count(); %f++)
{
%isChecked = AssetTypeListPopup.isItemChecked(%f+1);
if(%isChecked)
{
%filterTypeName = AssetFilterTypeList.getKey(%f);
if(%activeTypeFilterList $= "")
%activeTypeFilterList = %filterTypeName;
else
%activeTypeFilterList = %activeTypeFilterList @ ", " @ %filterTypeName;
}
}
}
}
else
{
%activeTypeFilterList = AssetBrowser.assetTypeFilter;
}
if(%activeTypeFilterList !$= "")
AssetBrowser_FooterText.text = AssetBrowser_FooterText.text @ " | Active Type Filters: " @ %activeTypeFilterList;
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 07:47:28 +00:00
%this.previewArrayDirty = false;
2018-01-28 21:30:17 +00:00
}
2020-07-11 21:49:06 +00:00
//
//
// Search
function AssetBrowser::updateSearchTextFromFilter(%this)
{
AssetSearchTerms.sortk();
//Update the displayed search text!
%newSearchPhrase = "";
%currentAction = "";
%actionCount = 0;
for(%i=0; %i < AssetSearchTerms.count(); %i++)
{
%action = AssetSearchTerms.getKey(%i);
%word = AssetSearchTerms.getValue(%i);
if(%action !$= %currentAction)
{
if(%actionCount != 0)
{
if(%action !$= "")
%newSearchPhrase = %newSearchPhrase @ ";" @ %action @ ":" @ %word;
else
%newSearchPhrase = %newSearchPhrase @ ";" @ %word;
}
else
{
if(%action !$= "")
%newSearchPhrase = %action @ ":" @ %word;
else
%newSearchPhrase = %word;
}
%actionCount++;
}
else
{
%newSearchPhrase = %newSearchPhrase @ "," @ %word;
}
%currentAction = %action;
}
AssetBrowserSearchFilter.setText(%newSearchPhrase);
}
function AssetBrowser::processSearchFilter(%this)
{
AssetSearchTerms.empty();
%searchText = AssetBrowserSearchFilter.getText();
%termCount = getTokenCount(%searchText, ";");
for(%s=0; %s < %termCount; %s++)
{
%term = getToken(%searchText, ";", %s);
%phraseCount = getTokenCount(%term, ":");
if(%phraseCount == 2)
{
//action/words split
%action = getToken(%term, ":", 0);
%words = getToken(%term, ":", 1);
}
else
{
%action = "";
%words = getToken(%term, ":", 0);
}
%wordCount = getTokenCount(%words, ",");
for(%w=0; %w < %wordCount; %w++)
{
%word = getToken(%words, ",", %w);
AssetSearchTerms.add(%action, %word);
}
}
}
//Takes an item and compares it against the parsed search language
//This is written to be inclusive, rather than exclusive
function matchesSearch(%assetName, %assetType)
{
if(AssetSearchTerms.count() == 0)
return true;
%matchTags = false;
%matchType = false;
%matchName = false;
%needsTag = false;
%needsType = false;
%needsName = false;
for(%i=0; %i < AssetSearchTerms.count(); %i++)
{
%action = AssetSearchTerms.getKey(%i);
%word = AssetSearchTerms.getValue(%i);
if(%action $= "tag" && %matchTags == false)
{
%needsTag = true;
if(%assetType $= "Datablock")
{
if(%assetName.category $= %word)
%matchTags = true;
}
else
{
2021-10-02 20:22:55 +00:00
if(strstr(strlwr(%assetName.tags), strlwr(%word)) != -1)
2020-07-11 21:49:06 +00:00
%matchTags = true;
}
}
else if(%action $= "type" && %matchType == false)
{
%needsType = true;
if(%assetType $= %word)
%matchType = true;
}
else if(%action $= "" && %matchName == false)
{
%needsName = true;
if(strstr(strlwr(%assetName), strlwr(%word)) != -1)
%matchName = true;
}
}
if(((%needsTag && %matchTags) || !%needsTag) &&
((%needsType && %matchType) || !%needsType) &&
((%needsName && %matchName) || !%needsName))
return true;
else
return false;
}
2018-01-28 21:30:17 +00:00
//
//
2019-10-20 07:47:15 +00:00
// Search Filters
function AssetBrowserSearchFilterTxt::onWake( %this )
2018-01-28 21:30:17 +00:00
{
/*%filter = %this.treeView.getFilterText();
if( %filter $= "" )
%this.setText( "\c2Filter..." );
else
%this.setText( %filter );*/
}
2019-10-20 07:47:15 +00:00
function AssetBrowserSearchFilterTxt::onGainFirstResponder( %this )
2018-01-28 21:30:17 +00:00
{
%this.selectAllText();
}
// When Enter is pressed in the filter text control, pass along the text of the control
// as the treeview's filter.
2019-10-20 07:47:15 +00:00
function AssetBrowserFolderSearchFilter::onReturn( %this )
2018-01-28 21:30:17 +00:00
{
%text = %this.getText();
if( %text $= "" )
%this.reset();
2019-10-20 07:47:15 +00:00
2019-12-03 06:09:18 +00:00
AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
2020-07-11 21:49:06 +00:00
function AssetBrowserFolderSearchFilter::onEdited(%this)
{
if(AssetBrowserFolderSearchFilter.getText() $= "")
{
AssetBrowser-->folderSearchBtn.setBitmap("tools/gui/images/stencilIcons/zoom.png");
}
else
{
AssetBrowser-->folderSearchBtn.setBitmap("tools/gui/images/stencilIcons/cross.png");
}
}
function AssetBrowserSearchFilter::onEdited(%this)
{
AssetBrowserSearchFilter.updateButton();
}
2019-10-20 07:47:15 +00:00
function AssetBrowserSearchFilter::onReturn( %this )
{
%text = %this.getText();
if( %text $= "" )
%this.reset();
2020-07-11 21:49:06 +00:00
AssetBrowserSearchFilter.updateButton();
AssetBrowser.processSearchFilter();
2019-10-20 07:47:15 +00:00
AssetBrowser.rebuildAssetArray();
}
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
function AssetBrowserSearchFilter::updateButton(%this)
{
if(%this.getText() $= "")
{
AssetBrowser-->assetSearchBtn.setBitmap("tools/gui/images/stencilIcons/zoom.png");
}
else
{
AssetBrowser-->assetSearchBtn.setBitmap("tools/gui/images/stencilIcons/cross.png");
}
}
2019-10-20 07:47:15 +00:00
function AssetBrowserFolderSearchFilter::reset( %this )
2018-01-28 21:30:17 +00:00
{
2020-07-11 21:49:06 +00:00
%this.setText( "" );
AssetBrowser-->folderSearchBtn.setBitmap("tools/gui/images/stencilIcons/zoom.png");
//AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
2019-10-20 07:47:15 +00:00
function AssetBrowserSearchFilter::reset( %this )
{
2020-07-11 21:49:06 +00:00
%this.setText( "" );
AssetBrowser-->assetSearchBtn.setBitmap("tools/gui/images/stencilIcons/zoom.png");
//AssetBrowser.rebuildAssetArray();
2019-10-20 07:47:15 +00:00
}
2018-01-28 21:30:17 +00:00
2020-07-11 21:49:06 +00:00
function AssetBrowserFolderSearchBtn::onClick( %this )
2018-01-28 21:30:17 +00:00
{
2019-10-20 07:47:15 +00:00
AssetBrowserFolderSearchFilter.reset();
2020-07-11 21:49:06 +00:00
AssetBrowser.refresh();
2019-10-20 07:47:15 +00:00
}
2020-07-11 21:49:06 +00:00
function AssetBrowserAssetSearchBtn::onClick( %this )
2019-10-20 07:47:15 +00:00
{
AssetBrowserSearchFilter.reset();
2020-07-11 21:49:06 +00:00
AssetBrowser.processSearchFilter();
AssetBrowser.rebuildAssetArray();
2019-10-20 07:47:15 +00:00
}
2019-12-03 06:09:18 +00:00
2019-10-20 07:47:15 +00:00
//
//
// Navigation
function AssetBrowser::navigateTo(%this, %address, %historyNav)
{
2020-08-08 18:01:50 +00:00
//Sanitize
if(startsWith(%address, "/"))
%address = strreplace(%address, "/", "");
2019-10-20 07:47:15 +00:00
//Don't bother navigating if it's to the place we already are
2020-09-02 06:26:43 +00:00
if(%this.dirHandler.currentAddress !$= %address)
2019-12-03 06:09:18 +00:00
{
2020-09-02 06:26:43 +00:00
%this.dirHandler.navigateTo(%address, %historyNav);
2019-12-03 06:09:18 +00:00
2020-07-11 21:49:06 +00:00
//%this.updateNavigationBreadcrumb(%address);
2020-09-02 06:26:43 +00:00
%this.lastValidNavPath = %address;
%this-->navPath.setText(%address);
2019-12-03 06:09:18 +00:00
2020-09-02 06:26:43 +00:00
%module = %this.dirHandler.getModuleFromAddress(%address);
2019-12-03 06:09:18 +00:00
if(%module !$= "")
{
//legit module, so set it as current target
2020-09-02 06:26:43 +00:00
%this.SelectedModule = %module.moduleId;
2019-12-03 06:09:18 +00:00
}
2020-07-11 21:49:06 +00:00
if(%this.hasLooseFilesInDir())
{
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
if(EditorSettings.value("Assets/AutoImportLooseFiles", false) && EditorSettings.value("Assets/AutoImport", false))
{
AssetBrowser.autoImportSimpleLooseFiles();
}
else
{
2020-07-11 21:49:06 +00:00
%this-->AutoImportAssetButton.visible = true;
Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 23:51:27 +00:00
}
2020-07-11 21:49:06 +00:00
}
else
{
%this-->AutoImportAssetButton.visible = false;
}
2019-12-03 06:09:18 +00:00
}
%this.rebuildAssetArray();
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 07:47:28 +00:00
%this.refresh();
2019-12-03 06:09:18 +00:00
}
function AssetBrowser::navigateHistoryForward(%this)
{
%this.dirHandler.navigateHistoryForward();
%this.updateNavigationBreadcrumb();
2020-09-02 06:26:43 +00:00
%address = %this.dirHandler.currentAddress;
2019-12-03 06:09:18 +00:00
%module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
if(%module !$= "")
{
//legit module, so set it as current target
2020-09-02 06:26:43 +00:00
%this.SelectedModule = %module.moduleId;
2019-12-03 06:09:18 +00:00
}
2020-09-02 06:26:43 +00:00
%this.lastValidNavPath = %address;
%this-->navPath.setText(%address);
2019-12-03 06:09:18 +00:00
%this.rebuildAssetArray();
}
function AssetBrowser::navigateHistoryBack(%this)
{
%this.dirHandler.navigateHistoryBack();
2019-10-20 07:47:15 +00:00
2019-12-03 06:09:18 +00:00
%this.updateNavigationBreadcrumb();
2020-09-02 06:26:43 +00:00
%address = %this.dirHandler.currentAddress;
%module = %this.dirHandler.getModuleFromAddress(%address);
2019-12-03 06:09:18 +00:00
if(%module !$= "")
{
//legit module, so set it as current target
2020-09-02 06:26:43 +00:00
%this.SelectedModule = %module.moduleId;
2019-12-03 06:09:18 +00:00
}
2020-09-02 06:26:43 +00:00
%this.lastValidNavPath = %address;
%this-->navPath.setText(%address);
2019-12-03 06:09:18 +00:00
%this.rebuildAssetArray();
}
function AssetBrowser::updateNavigationBreadcrumb(%this, %address)
{
2019-10-20 07:47:15 +00:00
//clear the breadcrumb bar
AssetBrowser_BreadcrumbBar.clear();
//break down the address
%folderCount = getTokenCount(%address, "/");
%rebuiltPath = "";
for(%f=0; %f < %folderCount; %f++)
{
%folderName = getToken(%address, "/", %f);
%rebuiltPath = %f == 0 ? %folderName : %rebuiltPath @ "/" @ %folderName;
%folderNavButton = new GuiButtonCtrl()
{
profile = ToolsGuiButtonProfile;
text = %folderName;
command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
extent = "100" SPC AssetBrowser_BreadcrumbBar.extent.y;
};
AssetBrowser_BreadcrumbBar.add(%folderNavButton);
if(%f != %folderCount-1)
{
%folderSpacerButton = new GuiBitmapButtonCtrl()
{
profile = ToolsGuiButtonProfile;
2021-08-02 09:20:27 +00:00
bitmapAsset = "ToolsModule:rightArrowWhite_image";
2019-10-20 07:47:15 +00:00
bitmapMode = "Centered";
extent = "25" SPC AssetBrowser_BreadcrumbBar.extent.y;
//command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
};
AssetBrowser_BreadcrumbBar.add(%folderSpacerButton);
}
}
//refresh the nav buttons to display the history
%backButtonHistory = "";
2019-12-03 06:09:18 +00:00
for(%i=0; %i < AssetBrowser.dirHandler.prevHistoryList.Count(); %i++)
2019-10-20 07:47:15 +00:00
{
2019-12-03 06:09:18 +00:00
%prevAddress = AssetBrowser.dirHandler.prevHistoryList.getKey(%i);
2019-10-20 07:47:15 +00:00
%backButtonHistory = %i==0 ? %prevAddress @ "\n" : %backButtonHistory @ %prevAddress @ "\n";
}
AssetBrowser_NavigateBackBtn.tooltip = %backButtonHistory;
%foreButtonHistory = "";
2019-12-03 06:09:18 +00:00
for(%i=0; %i < AssetBrowser.dirHandler.foreHistoryList.Count(); %i++)
2019-10-20 07:47:15 +00:00
{
2019-12-03 06:09:18 +00:00
%prevAddress = AssetBrowser.dirHandler.foreHistoryList.getKey(%i);
2019-10-20 07:47:15 +00:00
%foreButtonHistory = %i==0 ? %prevAddress @ "\n" : %foreButtonHistory @ %prevAddress @ "\n";
}
AssetBrowser_NavigateForwardBtn.tooltip = %foreButtonHistory;
2018-01-28 21:30:17 +00:00
}
2020-07-11 21:49:06 +00:00
function assetBrowserNavPath::onReturn(%this)
{
%newPath = %this.getText();
if(isDirectory(%newPath))
{
AssetBrowser.lastValidNavPath = %newPath;
AssetBrowser.navigateTo(%newPath);
}
else
{
%this.setText(AssetBrowser.lastValidNavPath);
AssetBrowser.navigateTo(AssetBrowser.lastValidNavPath);
}
}
2018-01-28 21:30:17 +00:00
//
//
//
function AssetBrowser::reloadModules(%this)
{
ModuleDatabase.unloadGroup("Game");
%modulesList = ModuleDatabase.findModules();
%count = getWordCount(%modulesList);
for(%i=0; %i < %count; %i++)
{
%moduleId = getWord(%modulesList, %i).ModuleId;
ModuleDatabase.unloadExplicit(%moduleId);
}
ModuleDatabase.scanModules();
%modulesList = ModuleDatabase.findModules();
%count = getWordCount(%modulesList);
for(%i=0; %i < %count; %i++)
{
%moduleId = getWord(%modulesList, %i).ModuleId;
ModuleDatabase.loadExplicit(%moduleId);
}
//ModuleDatabase.loadGroup("Game");
}
2019-10-20 07:47:15 +00:00
//
//
//
function AssetBrowser::toggleFolderCollapseButton(%this)
{
%this.folderPanelState = !%this.folderPanelState;
//If we're collapsing
if(!%this.folderPanelState)
{
//Store the original
%this.folderPanelSplit = AssetBrowser_MainSplit.splitPoint.x;
//collapse it
AssetBrowser_MainSplit.setSplitPoint(AssetBrowser_MainSplit.splitterSize SPC AssetBrowser_MainSplit.splitPoint.y);
}
else
{
//restore the original
AssetBrowser_MainSplit.setSplitPoint(%this.folderPanelSplit SPC AssetBrowser_MainSplit.splitPoint.y);
}
}
//
//
// Drag n drop
2020-07-11 21:49:06 +00:00
function AssetBrowserPreviewButton::onMouseDragged(%this)
2018-01-28 21:30:17 +00:00
{
2020-07-11 21:49:06 +00:00
%payload = %this.clone();
%payload.position = "0 0";
//%payload.class = "AssetPreviewControl";
2018-01-28 21:30:17 +00:00
%xOffset = getWord( %payload.extent, 0 ) / 2;
%yOffset = getWord( %payload.extent, 1 ) / 2;
// Compute the initial position of the GuiDragAndDrop control on the cavas based on the current
// mouse cursor position.
%cursorpos = Canvas.getCursorPos();
%xPos = getWord( %cursorpos, 0 ) - %xOffset;
%yPos = getWord( %cursorpos, 1 ) - %yOffset;
if(!isObject(EditorDragAndDropLayer))
{
new GuiControl(EditorDragAndDropLayer)
{
position = "0 0";
extent = Canvas.extent;
};
}
// Create the drag control.
%ctrl = new GuiDragAndDropControl()
{
canSaveDynamicFields = "0";
Profile = "GuiSolidDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = %xPos SPC %yPos;
extent = %payload.extent;
MinExtent = "4 4";
canSave = "1";
Visible = "1";
hovertime = "1000";
// Let the GuiDragAndDropControl delete itself on mouse-up. When the drag is aborted,
// this not only deletes the drag control but also our payload.
deleteOnMouseUp = true;
useWholeCanvas = true;
// To differentiate drags, use the namespace hierarchy to classify them.
// This will allow a color swatch drag to tell itself apart from a file drag, for example.
class = "AssetPreviewControlType_AssetDrop";
};
// Add the temporary color swatch to the drag control as the payload.
%ctrl.add( %payload );
// Start drag by adding the drag control to the canvas and then calling startDragging().
//Canvas.getContent().add( %ctrl );
EditorDragAndDropLayer.add(%ctrl);
Canvas.pushDialog(EditorDragAndDropLayer);
%ctrl.startDragging( %xOffset, %yOffset );
2020-07-11 21:49:06 +00:00
Canvas.repaint();
2018-01-28 21:30:17 +00:00
}
2020-07-11 21:49:06 +00:00
function AssetBrowserPreviewButton::onControlDragCancelled(%this)
2018-01-28 21:30:17 +00:00
{
Canvas.popDialog(EditorDragAndDropLayer);
}
2020-07-11 21:49:06 +00:00
function AssetBrowserPreviewButton::onControlDropped( %this, %payload, %position )
2018-01-28 21:30:17 +00:00
{
Canvas.popDialog(EditorDragAndDropLayer);
if( !%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ) )
return;
// If dropped on same button whence we came from,
// do nothing.
if( %payload.dragSourceControl == %this )
return;
2019-12-23 18:37:55 +00:00
2020-07-11 21:49:06 +00:00
%assetType = %payload.assetType;
%assetName = %payload.assetName;
%moduleName = %payload.moduleName;
2019-12-23 18:37:55 +00:00
%targetAssetName = %this.assetName;
%targetAssetType = %this.assetType;
%targetModuleName = %this.moduleName;
2018-01-28 21:30:17 +00:00
2019-12-23 18:37:55 +00:00
if( %payload.dragSourceControl.class $= "AssetPreviewButton" && %targetAssetType $= "Folder")
2018-01-28 21:30:17 +00:00
{
2019-12-23 18:37:55 +00:00
%destination = %targetModuleName @ "/" @ %targetAssetName;
if(%assetType $= "Folder")
{
%originFolder = %moduleName @ "/" @ %assetName;
%destination = %destination @ "/" @ %assetName;
//Do any cleanup required given the type
if(AssetBrowser.isMethod("moveFolder"))
eval(AssetBrowser @ ".moveFolder(\""@%originFolder@"\",\""@%destination@"\");");
}
2018-01-28 21:30:17 +00:00
else
2019-12-23 18:37:55 +00:00
{
%assetId = %moduleName @ ":" @ %assetName;
%assetDef = AssetDatabase.acquireAsset(%assetId);
%assetType = AssetDatabase.getAssetType(%assetId);
//Do any cleanup required given the type
if(AssetBrowser.isMethod("move"@%assetType))
{
%command = AssetBrowser @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");";
eval(AssetBrowser @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");");
}
}
AssetBrowser.refresh();
2018-01-28 21:30:17 +00:00
}
}
function EWorldEditor::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);
// Make sure this is a color swatch drag operation.
if( !%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ) )
return;
// If dropped on same button whence we came from,
// do nothing.
if( %payload.dragSourceControl == %this )
return;
2020-07-11 21:49:06 +00:00
%assetType = %payload.assetType;
2018-01-28 21:30:17 +00:00
2021-12-05 04:47:10 +00:00
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
2020-07-11 21:49:06 +00:00
%module = %payload.moduleName;
%asset = %payload.assetName;
2018-01-28 21:30:17 +00:00
2019-12-03 06:09:18 +00:00
if(AssetBrowser.isMethod("on" @ %assetType @ "EditorDropped"))
{
2020-07-11 21:49:06 +00:00
if(%assetType $= "Datablock")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %asset @ ",\"" @ %position @ "\");";
}
2020-12-03 06:19:16 +00:00
else if(%assetType $= "Prefab")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(\"" @ %module @ "/" @ %asset @ "\",\"" @ %position @ "\");";
}
2021-01-24 10:33:28 +00:00
else if(%assetType $= "Creator")
{
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %module @ ",\"" @ %position @ "\");";
}
2020-07-11 21:49:06 +00:00
else
{
%assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %asset);
%buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %assetDef @ ",\"" @ %position @ "\");";
}
2019-12-03 06:09:18 +00:00
eval(%buildCommand);
2021-09-01 06:12:16 +00:00
if(EditorSettings.value("AssetManagement/Assets/closeBrowserOnDragAction", false))
{
AssetBrowser.hideDialog();
}
2019-12-03 06:09:18 +00:00
}
2018-01-28 21:30:17 +00:00
EWorldEditor.isDirty = true;
}
Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 22:40:15 +00:00
function GuiEditor::onControlDropped(%this, %payload, %position)
{
Canvas.popDialog(EditorDragAndDropLayer);
// Make sure we have the right kind of D&D.
if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) &&
!%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ))
return;
if( %payload.dragSourceControl == %this )
return;
%pos = %payload.getGlobalPosition();
%x = getWord(%pos, 0);
%y = getWord(%pos, 1);
if(%payload.assetType !$= "Creator")
{
//dealing with an actual asset, so build the assetName
%assetId = %payload.moduleName @ ":" @ %payload.assetName;
%assetType = AssetDatabase.getAssetType(%assetId);
if(%assetType $= "ImageAsset")
{
%cmd = "return new guiBitmapCtrl();";
%ctrl = eval( %cmd );
%ctrl.bitmap = %assetId;
}
}
else
{
%className = %payload.assetName;
%cmd = "return new " @ %className @ "();";
%ctrl = eval( %cmd );
}
%this.addNewCtrl(%ctrl);
%ctrl.setPositionGlobal(%x, %y);
%this.setFirstResponder();
if(EditorSettings.value("AssetManagement/Assets/closeBrowserOnDragAction", false))
{
AssetBrowser.hideDialog();
}
}
2018-01-28 21:30:17 +00:00
function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);
if( !%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ) )
return;
2020-07-11 21:49:06 +00:00
%assetType = %payload.assetType;
%assetName = %payload.assetName;
%moduleName = %payload.moduleName;
2018-01-28 21:30:17 +00:00
%item = %this.getItemAtPosition(%position);
%parent = %this.getParentItem(%item);
2019-11-24 12:52:34 +00:00
if(%item != 1)
2018-01-28 21:30:17 +00:00
{
2019-11-24 12:52:34 +00:00
//we're a folder entry, cool
%path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item);
2018-01-28 21:30:17 +00:00
2019-12-03 06:09:18 +00:00
if(%path !$= AssetBrowser.dirHandler.CurrentAddress)
2018-01-28 21:30:17 +00:00
{
//we're trying to move the asset to a different module!
2020-07-24 05:40:03 +00:00
//toolsMessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?",
2019-12-23 18:37:55 +00:00
// "AssetBrowser.moveAsset(\""@ %moduleName @ ":" @ %assetName @"\", \""@%path@"\");", "");
if(%assetType $= "Folder")
{
%originFolder = %moduleName @ "/" @ %assetName;
%path = %path @ "/" @ %assetName;
//Do any cleanup required given the type
if(AssetBrowser.isMethod("moveFolder"))
2022-04-04 01:00:30 +00:00
{
2019-12-23 18:37:55 +00:00
eval(AssetBrowser @ ".moveFolder(\""@%originFolder@"\",\""@%path@"\");");
2022-04-04 01:00:30 +00:00
AssetBrowser.refresh();
}
2019-12-23 18:37:55 +00:00
}
else
{
%assetId = %moduleName @ ":" @ %assetName;
%assetDef = AssetDatabase.acquireAsset(%assetId);
%assetType = AssetDatabase.getAssetType(%assetId);
//Do any cleanup required given the type
if(AssetBrowser.isMethod("move"@%assetType))
{
%command = AssetBrowser @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %path @ "\");";
eval(AssetBrowser @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %path @ "\");");
2022-04-04 01:00:30 +00:00
AssetBrowser.refresh();
2019-12-23 18:37:55 +00:00
}
}
2018-01-28 21:30:17 +00:00
}
}
2019-11-24 12:52:34 +00:00
}
function AssetBrowserFilterTree::onDragDropped( %this )
{
}
2020-02-17 06:32:50 +00:00
2020-07-11 21:49:06 +00:00
function AssetBrowser::hasLooseFilesInDir(%this)
{
2021-09-10 07:13:56 +00:00
if(!isDirectory(%this.dirHandler.currentAddress))
return false;
2020-07-11 21:49:06 +00:00
//First, wipe out any files inside the folder first
%file = findFirstFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*", false);
%aq = new AssetQuery();
while( %file !$= "" )
{
if(!strIsMatchExpr("*.asset.taml", %file) && !strIsMatchExpr("*.taml", %file) && !strIsMatchExpr("*.cached.dts", %file))
{
%assetsFound = AssetDatabase.findAssetLooseFile(%aq, %file);
if(%assetsFound == 0)
{
%ext = fileExt(%file);
if(isShapeFormat(%ext) || isImageFormat(%ext) || isSoundFormat(%ext))
{
%aq.delete();
return true;
}
}
}
%file = findNextFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*" );
}
%aq.delete();
return false;
}
function AssetBrowser::autoImportSimpleLooseFiles(%this)
{
%importer = new AssetImporter();
//First, wipe out any files inside the folder first
%file = findFirstFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*", false);
%aq = new AssetQuery();
while( %file !$= "" )
{
2022-02-25 06:03:33 +00:00
if(!strIsMatchExpr("*.asset.taml", %file) && !strIsMatchExpr("*.taml", %file) && !strIsMatchExpr("*.cached.dts", %file)
&& !strIsMatchExpr("*.cs", %file) && !strIsMatchExpr("*.tscript", %file) && !strIsMatchExpr("*.module", %file))
2020-07-11 21:49:06 +00:00
{
2022-02-25 06:03:33 +00:00
%aq.clear();
2020-07-11 21:49:06 +00:00
%assetsFound = AssetDatabase.findAssetLooseFile(%aq, %file);
if(%assetsFound == 0)
{
%ext = fileExt(%file);
if(isShapeFormat(%ext) || isImageFormat(%ext) || isSoundFormat(%ext))
{
%assetId = %importer.autoImportFile(%file);
}
}
}
%file = findNextFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*" );
}
%aq.delete();
%importer.delete();
%this.refresh();
}
function AssetBrowser::getLooseFilesInDir(%this)
{
if(!isObject(ABLooseFileArray))
new ArrayObject(ABLooseFileArray);
ABLooseFileArray.empty();
%showLooseFiles = EditorSettings.value("Assets/Browser/showLooseFiles", false);
if(%showLooseFiles == false)
return;
//First, wipe out any files inside the folder first
%file = findFirstFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*", false);
%aq = new AssetQuery();
while( %file !$= "" )
{
if(!strIsMatchExpr("*.asset.taml", %file) && !strIsMatchExpr("*.taml", %file) && !strIsMatchExpr("*.cached.dts", %file))
{
%assetsFound = AssetDatabase.findAssetLooseFile(%aq, %file);
if(%assetsFound == 0)
{
ABLooseFileArray.add(%file);
}
}
%file = findNextFileMultiExpr( %this.dirHandler.currentAddress @ "/*.*" );
}
%aq.delete();
return false;
}
2020-02-17 06:32:50 +00:00
//
//
function AssetBrowser::importLooseFiles(%this)
{
echo("Adding loose files at directory " @ %this.dirHandler.currentAddress);
LooseFileAuditWindow.showDialog(%this.dirHandler.currentAddress);
2021-08-02 09:20:27 +00:00
}
2021-11-15 03:39:51 +00:00
//
function getAssetPreviewImage(%asset)
{
if(isFile(%asset))
{
%aq = new AssetQuery();
%assetsFound = AssetDatabase.findAssetLooseFile(%aq, %asset);
if(%assetsFound != 0)
{
%asset = %aq.getAsset(0);
}
else
{
%previewPath = %asset;
}
%aq.delete();
}
if(AssetDatabase.isDeclaredAsset(%asset))
{
%moduleName = AssetDatabase.getAssetModule(%asset).ModuleId;
%assetName = AssetDatabase.getAssetName(%asset);
%previewAssetName = "ToolsModule:" @ %moduleName @ "_" @ %assetName @ "_PreviewImage";
if(AssetDatabase.isDeclaredAsset(%previewAssetName))
{
%previewDef = AssetDatabase.acquireAsset(%previewAssetName);
%previewPath = %previewDef.getImagePath();
AssetDatabase.releaseAsset(%previewAssetName);
}
else
{
%previewPath = %asset;
}
}
else
{
%previewPath = %asset;
}
if(%previewPath $= "")
%previewPath = "ToolsModule:unknownImage_image";
return %previewPath;
}