Commit graph

1308 commits

Author SHA1 Message Date
Robert MacGregor 3dafdef5da * BugFix: Mount home:/ to refer to Torque's original Documents/<APPNAME> output for eg. prefs while leaving data:/ as an option for those that may want it. 2022-06-13 10:53:01 -04:00
Robert MacGregor 161ffc62fe Merge branch 'Preview4_0' into feature-vfs-security 2022-06-13 08:05:26 -04:00
AzaezelX e60927f2f7 opengl does *not* like casting floats to vec#s as a general rule. 2022-06-12 15:08:00 -05:00
JeffR 67d8448915 Fixes cleanup handling on guiBitmapButtonCtrl and guiGameSettingsCtrl to release the bound textures like other GUI controls when they sleep, avoiding a texture object leak.
Fixes a call for UINavigation to getPageCount that was erroneously referencing the pageStack
Fixes fetch and binding of the image for display when using the uvEditor
2022-06-09 16:29:32 -05:00
AzaezelX de6ee93159 slim ambient down to vec3, default to premul for translucency 2022-06-07 22:05:47 -05:00
AzaezelX 5be18a4638 allow ambient light injection into ibl 2022-06-06 17:50:34 -05:00
JeffR f4ca9c5202 Adds sanity check on UINavigation to avoid crashes if there are no pages in the stack.
Removes button to fill import terrain images temporarily to contend with limitations in asset creation workflow
Adds sanity check to saving terrain material that obligates setting of diffuse and detail maps so everything displays and blends properly
2022-06-05 15:35:20 -05:00
JeffR 1acf4b2dae Adjusts engine cleanup ordering on shaderFeatureMgr to avoid periodic crashes on Mac ARM machines
Adds missing disconnect/timeout handling callbacks to the clientServer core module
Adds page refresh function to UINavigation to be able to selectively nudge the current page to refresh its contents if needbe
2022-06-05 01:21:38 -05:00
JeffR c7763fe3ec Added cleanup of exec stack for module when it's finished to avoid duplicate executions
Added proper container bracketing for the main menu buttons and made that the main navigation target
Added logic to UINav to prevent needlessly re-setting the root page if it already is the root page, which would break the navigation stack
Added logic to UINav toprevent needlessly adding duplicate pages whicn would break the navigation stack
Added logic to close the chooseLevelDlg page when the level is loaded to avoid the page being left hanging on the nav stack
Fixed assetId for no preview image fallback on the chooseLevelDlg page
Fixed display of icons in the shape editor shape helper section
Fixed name lookup on terrain material editor dialogue which would break saving of terrain materials
Disables TORQUE_SFX_DirectX which is currently not in use and nonfunctional
2022-06-02 20:17:23 -05:00
Brian Roberts d9361a0128
Merge pull request #799 from Areloch/MiscFixes20220530
Misc Fixes for 2022/05/30
2022-05-31 14:33:59 -05:00
JeffR d56a05c314 Trim unneeded input commands 2022-05-31 01:12:02 -05:00
JeffR 27b20c14d7 Cleans up the ExampleModule to have up-to-date examples of module init'ing, game modes, levels and basic input logic
Cleans up prototyping module to trim unneeded extra scripts and files
Adds PlayerBot model to Prototyping module
Adds metalGray material to Prototyping module
Fixes issue where logic wasn't changed for forcing AB preview images to regenerate
Removes unneeded legacy lines from editor template level
Removes unneeded extra asset import config
Disables terrain material name field from editing in terrain material editor for now to prevent bad behavior
Adds mapTo line to newly created material asset definitions to ensure shapes doing mapTo lookups can properly utilize the materials
2022-05-31 00:26:20 -05:00
Brian Roberts 9486587014
Merge pull request #795 from Azaezel/alpha40/forrestfunteims
lower min brushsize for forest to sub-meter levels
2022-05-30 16:35:35 -05:00
Brian Roberts 8e15369db9
Merge pull request #796 from Azaezel/alpha40/particlePlop
fix particle emitter asset browser spawning
2022-05-30 16:35:28 -05:00
dottools 8267c13696 BaseGame Template: Fix script assert on canceling game options changes 2022-05-30 15:54:32 -05:00
AzaezelX da820e268e fix particle emitter asset browser spawning 2022-05-30 11:30:16 -05:00
AzaezelX 3423c9eb13 lower min brushsize for forest to sub-meter levels 2022-05-30 10:56:43 -05:00
JeffR 70a9666cc3 Removes erroneous assignment of loaded state onto fallback assets when we fail to find an assetId by filename for image and shape assets
Fixed handling of TSStatics' materialSlot fields, where if the field has been changed, it properly loads the modified field and ensures the reskin action happens correctly.
Changed text on some context popup menu to better indicate the action Views loose files, not imports them
Makes the Loose File Viewer skip cached.dts files.
2022-05-25 00:12:12 -05:00
Brian Roberts 516163fd5d
Merge pull request #781 from Areloch/MiscFixes20220510
Misc Fixes for 2022/05/10
2022-05-11 01:15:07 -05:00
JeffR 8aed00ec4d Fixed graphical level values to set defaultAnisotropy instead of vsync
Forced update of cursor position when using keyboard/mouse on options menu when changing an option to re-establish focus after refresh
Updated missed bitmap field on GuiPopupMenuItemBorder to use assetId
Made folders display before other preview entries in the AB for ease of navigation
Fixed issue where when re-opening the AB the path would reset, especially with select mode
Fixed issue when generating previews for materials, terrain materials and shapes where the very first time the preview generated it wouldn't map correctly
Cleaned up some old commented code blocks
Added text to the Open menubar entry in the GUIEditor to indicate it opens files specifically to add clarity
2022-05-11 00:58:14 -05:00
JeffR 5f871763fb Adds creator callback integration to pair with the base UI module having shortcut creator entries in the GUIEditor for creating stuff like the UINavigation containers, or MenuList controls with the namespace hooks already established. 2022-05-09 20:57:42 -05:00
JeffR 07b3e2789e Adds proper documentation and explains some of the navigation/menu usage behavior via the BaseUI example menus 2022-05-09 16:17:22 -05:00
JeffR 41add628ad Implements a more standardized way to format usual UI pages by having the ability to utilize the UINavigation namespace for page stack navigation
Also fixes behavior handling of menu input buttons not refreshing reliably
Adds ability to define a control on a MenuList to act as a highlighter over the currently selected control
Cleaned up BaseUI pages to use UINavigation which reduced a lot of duplication of elements and code
2022-05-06 23:39:16 -05:00
Jeff Hutchinson c6263829c9 Make the Console Sane Again 2022-04-27 21:28:49 -04:00
JeffR 81eec1dcb4 Added multi type filter support to AB select mode
Adjusted logic for World Editor's Assets tab to filter by ShapeAssets and Datablocks
Improved ShapeEditor's Assets tab filter and select logic
Added ability for AB search to work on creator section
Fixed icon display of AB on preview cards when in list mode
2022-04-24 13:03:33 -05:00
JeffR 4f3d6c918b Fixes issue where storing of AB position and extent wasn't applying correctly
Changes ShapeEditor's Library tab to an "Assets" tab and opens the AB with the shapeAsset filter on
Adds Asset tab to world editor scenetree window that opens the assetBrowser
Fixes issue where opening default scene in worldEditor would activate the saveAs dirty flag, then if you exit the level and open a new one, you can only saveAs and not save the existing level asset
2022-04-24 12:16:22 -05:00
JeffR 70a70dfc10 Fixes issue with some of the On/Off options not properly toggling in the OptionsMenu
Adds staged loading/generation of preview images for image, shape, material and terrain material types to improve navigation responsiveness
Disabled lookup of bitmap info of image assets for tooltip metadata as it was causing major hangs when the images were high resolution
Added function so Import new File button on AB interface will correctly prompt to find and then import in a new file
Fixed theming of AssetBrowser preview card profiles to improve readability
Fixed theming of ToolsGuiTextListProfile to improve readability
Fixed issue where trying to import in a splat map for importing terrain data could fail due to not having full path when trying to load the bitmap's channel data
Corrected Import Terrain Heightmap item in menubar to prompt creation of a new terrain asset in addition to opening the import terraindata window to avoid missed steps foc creation
2022-04-23 16:07:36 -05:00
AzaezelX 880ac5a264 bump down saveScaledImage default to 256
also add a "Assets/Browser/PreviewImageSize" value lookup, which if left blank defaults to 256
2022-04-12 19:46:19 -05:00
JeffR 5c8d8fab00 Changes behavior with suffix appending of asset importer so it doesn't contaminate the original "clean" name, which is used for setting the mapTo value of material definitions
Also adds a sanity check when applying the type suffix to see if it's already there to avoid needless doubleups
Fixes offsetting/positioning behavior on icon buttons to actually respect the icon position variable
Adds sanity checks to ensure we're not trying to utilize a in-process-of-deleting decoy dummy
Fixes handling of sliders in option menus to properly store and test unapplied values
Fixes handling of display device setting to properly store and test unapplied values
Adds additional logic to creation of shape and material asset previews to attempt to force-load dependencies to improve likelihood that they'll actually be loaded when we go to generate the preview.
Temp disables creating cubemap 'assets' via the RMB context menu in the AB
2022-04-10 01:40:15 -05:00
Brian Roberts be3be2eb7d
Merge pull request #760 from Areloch/ForestBrushGroupToolingFixes
Fixes tooling of Forest Editor to be module-friendly
2022-04-08 01:29:06 -05:00
JeffR bfe3d4d02b Shifts handling of forest brush and item elements into standard simsets for consistency
Updates the forest editor tooling to utilize the new sets, and adjusts the creation of new Brushes in the forest editor to have user select a target module first.
This ensures all a module's brushes are grouped into the new ForestBrushGroup class which auto-registers into the ForestBrushSet, thus allowing modules to have their own sets of brushes that automatically hook into the editor workflow.
2022-04-07 18:19:13 -05:00
JeffR 976c0bca79 Fixed uninitialized values for renderMeshExample and renderShapeExample which would cause a crash on creation
Added utility method to prefab to be able to get the internal simGroup that contains it's children
Adjusted logic for mounting items in GuiShapeEdPreview to utilize assetIds for the shapes
Moved the Asset and AssetBrowser editor settings populate functions to the AssetBrowser script to better organize things
Fixed command usage for General, Player and Observer spawn point creator entries to use the correct callback commands
Fixed logic for creator callback commands that don't just route through the class name based structure
Added RMB context menu actions for opening asset file or folder locations in OS file explorer
Fixed lookup of animation assets when editing a shape's animations in the shape editor so it provides the assetId of the anim if it exists
Fixes handling of mounting in the shape editor so it utilizes assets and the asset browser like everything else
2022-04-06 01:08:20 -05:00
JeffR 6b28f1f151 Fleshes out remaining missing editor settings entries/categories
Makes GUIAssets exec scripts before the gui file to allow onAdd methods to work
Adds missing getForestPath and getNavmeshPath methods and updates asset move logic to utilize them
2022-04-05 00:29:58 -05:00
JeffR 5a83897ede Fixes names so assignment of ORM config map on terrain materials works properly again 2022-04-04 01:41:40 -05:00
JeffR d044ae0702 Removed unneeded default irradiance and prefilter cubemaps, and their convars
Added getGUIPath console function to guiAsset
Corrected console function documentation for getScriptPath in MaterialAsset
Added getter console functions to PostEffectAsset
Added getAnimationPath console function to PostEffectAsset
Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets
Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets
Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az)
Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az)
Fixed duplicate naming of quality levels on LightingQualityList
Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly
Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu
Improves check for unapplied graphics options on options menu and applies them all at once
Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic
Adds better tracking of what options menu category is shown so refreshes don't reset it
Add better handling for changing resolution in options menu and getting it to apply properly
Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate
Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript
Removed unneeded extra logging from asset browser drag-n-drop actions
Adds item to RMB context menu in AB to regenerate preview images
Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains
Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided
Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1.
Temporarily disables fields and handling of 'open in Torsion'.
Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly
Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else
Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes
Adds proper loading of roughness and metalness fields in material editor
Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder
Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else
Adds check to avoid spam of markItem errors in the event requested tree item is invalid
Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00
JeffR bae6a3f514 Fixes assignment of the mapTo field for terrain FX materials to point to the assetId rather than just the assetName, fixing the material mapping lookups
Fixes project import to comply to above change
Makes Material default mEffectColor to white instead of whatever default value it comes up with due to memset
2022-03-31 18:58:06 -05:00
JeffR c2857efe28 Adds logic to up-convert non-embedded terrain materials and materials to have embedded definitions 2022-03-31 00:40:24 -05:00
JeffR 85bb4cbff3 Adds cleanup of material and terrain material objects when creating a new asset of the respective type to avoid collisions when we immediately properly init the asset on creation
Reorganizes the terrainMaterialDlg to use a split container for better usability, fixed some minor layout issues, and added in FX material fields to be able to edit those directly via the terrain mat editor
Updated the terrainMaterialDlg save logic to better sequence the steps for saving to allow stable in-place creation of asset for stub materials due to missing references
Updated the terrainMaterialDlg save logic to properly save out all the material effects stuff like footstep flags, effect colors, or sounds.
2022-03-30 01:38:15 -05:00
JeffR 81aa43a4bd Fixed formatting to match the standard for TerrainMaterialAsset inspector fields
Added utility functions to TerrainMaterialAsset for getting the material and fx material definitions
Fixed logical flaw with the initialization code that could cause the materialDefinition to be nulled in terrainmaterialassets
Fixed layer handling in GroundCover to properly work with TerrainMaterialAssets
Added logic to properly exit out of the onAdd in the event no internal name is assigned or if there is a collision. This prevents duplicates from appearing in the terr mat editor when creating a new material
Fixed issue where going from a creator item in the AB to selecting a particular asset type would break the filtering because select mode removed collections and creator items, changing all the item ids and breaking references.
Added sanity check to prevent attempting to acquire non-assets in the AB, such as creator entries, which would cause console spam
Added optional field to provide an override new asset name to the New Asset window
Added logic so in the event no FX Material is found when importing a terrain material, it will create a stub entry so it always has one defined
Added logic to handle situations where a terrain has a reference to an assetId, but the asset does not exist for whatever reason. Will prompt to create the missing asset, then continue on with the regular saving/editing process as normal
Fixed issue where the terrain material editor would try and reference the preview images being used in the display on the editor instead of the proper assetId itself
2022-03-29 01:40:07 -05:00
JeffR f204a4c646 Fixes issue where nested callOnModules would thrash the queued exec lists from other invokes
Also removes unwanted reference ids from the OptionsMenu gui object and disabled the ability for dynamic fields to be saved on it to prevent it from happening again.
2022-03-27 14:09:41 -05:00
Brian Roberts d3832d062e
Merge pull request #747 from Azaezel/alpha40/playGuiCallbackHooks
extended callonModules hooks for baseline playgui
2022-03-27 04:37:28 -05:00
Brian Roberts c64671ff91
Merge pull request #753 from Areloch/miscFixes20220327
Misc Fixes for 2022/03/27
2022-03-27 04:36:49 -05:00
JeffR dff83182e2 Added sanity check to ensure that the requested file to be scaled via saveScaledImage actually exists
Shifts integration of other modules with the OptionsMenu so other modules can inject their own options categories to a callOnModules hook
Updated ExampleModule to use new options menu integration angle to show example option
Deleted unneeded dropdown_textEdit_image asset def from baseUI
Fixed incorrect internal values for the terrainIcon_image asset def that made it present as a redundant terrain material asset
Cleaned up old, bad loadFilters calls and replaced them with the proper refresh() calls.
Removed old, bad calls for jumping through the asset browser's tree from when it was still hardcoded organization, which cuts down a lot of error spam
Cleaned up some of the asset type's preview image assignment code to be more reliable
Made terrain materials now use a similar preview proxy shape as regular materials
Fixed erroneous duplicate GuiInspectorTypeShapeAssetPtr::onControlDropped, which was breaking drag-n-drop actions of shapeAssets into inspector fields
Added proper logic for drag-n-drop actions of imageAssets into inspector fields
Add sanity check after creating new asset to avoid redundant attempts at initialization of the new asset
Fixed ConvexShape Editor tooling so you can now use the UI to apply the selected material to the selected surface
Added tools menu to the menubar with the Project Importer entry so the PI can be launched from either tool
Implemented ability to drag-n-drop imageAssets onto MaterialEditor map fields and have it work
Implemented ability to drag-n-drop imageAssets onto TerrainMaterial Editor map fields and have it work
Made the TerrainMaterial editor dialogue have a non-modal background so you can interact with the editor as normal while it's up
Add sanity check to avoid attempting to mark EditorTree items if we couldn't find it's id
renamed BaseMap references in terrain material editor to diffuseMap for consistency
2022-03-27 03:05:48 -05:00
JeffR 69d547fd72 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-26 22:36:37 -05:00
Brian Roberts 05a6a249ea
Merge pull request #748 from Areloch/MiscImportAndToolFixes
Misc Tool and Asset Import fixes and improvements
2022-03-20 18:49:36 -05:00
JeffR 26044677c1 Made renaming of terrain materials on importing terrainblocks to use the full assetId, as it should 2022-03-20 16:42:21 -05:00
JeffR cf8659735b Adjusts handling so if a file being processed for importing is not actually imported as a new, successful asset it does not return an id, allowing tooling to only worry about actual new assets.
Adds utility functions to TerrainBlock to be able to replace names of materials in the terrain file, mostly used for importing legacy files
Adjusts terrainblock save asset logic to be able to save on a non-networked terrainblock such as when loaded temporarily on the server, for tooling purposes.
Changes handling of not-found terrain materials when loading a terrain block so it will create a dummy terrain material with the same name as the not-found, but set the texture as the Warning image, instead of thrashing the original material names data
Adds logic for testing newly imported terrain files' materials and if needbe, replacing them with the new terrain material asset ids.
Adds logic in the project importer for if a would-be level asset's name already exists, we attempt to slap a "Level" suffix onto it to sidestep collisions.
Changed LegacyImport config to try always adding shape suffix to help minimize probable naming collisions.
Fixed handling of mission file's MissionGroup defines by specially checking for MissionGroup objects and processing the line into a Scene() declaration instead.
2022-03-20 16:17:06 -05:00
JeffR b3342ff7e6 Adds handling for import of files marked as ShapeAnimationAsset
Adds filetype handling of dsqs for importing
Improves logic checks to prevent incorrectly redundantly processing incoming assets for collisions, which could mark all assets as colliding instead of all but the first.
Adds better handling for assets marked as for dependency usage when importing
Improves rules for writing originalFilePath only if it's actually from an external directory, and the file actually exists to prevent polluting in redundant or garbage data
Fixes issue where MaterialEditor was not tracking the currently material assetId if the material was changed via the dropdown selector
Adds a sanity check to shapeAnimationAsset load so if the resource does not load properly it doesn't hard crash but instead logs the error and returns safely.
2022-03-20 03:17:31 -05:00
AzaezelX 8cea8ec011 extended callonModules hooks for baseline playgui
used for the noticeSystem chathud injection sample
2022-03-19 13:03:33 -05:00
Brian Roberts c95db92622
Merge pull request #745 from Areloch/FixEditorsMenubar
Fixes handling of the setEditor commands so that the dropdown Editors menubar entry properly works
2022-03-17 13:40:01 -05:00