Commit graph

65 commits

Author SHA1 Message Date
JeffR 6b3fcd8e74 Shifts the console method for manually invoking load() from being ShapeAsset specific to being generalized to AssetBase 2025-10-13 08:13:37 -05:00
JeffR e02981c848 Fixes various reported issues with the ShapeEd update
- Updates addSequence for the TSShapeConstructor so it can properly understand if it's handed an assetId or not, and if it is, stores that as the source data for use later
- Has the added benefit of ensuring no erroneous double-ups of data causing accidental overwrites when saving the shapeConstructor because it thinks the data 'changed'
- Fixed saving of new added sequences in shape constructor to properly trip whitespace
- Adds ability to manually trigger a ShapeAsset to load the shape data
- Adjusted the logic for getting a shape/animation asset's constructor when adding a new sequence to avoid false reporting of no constructor existing(by manually loading it)
- Fixed formatting on ShapeEd Anim window to properly scale
- Added onWake calls for the ShapeEd select and properties windows to better prep them position/extents-wise so they should behave more consistently
- Fixed issue of Not closing material editor if it was opened via the Edit Selected Material button in the ShapeEd
- Fixed issue of highlighting of material not going away when ShapeEditor is closed
2025-10-13 00:07:46 -05:00
AzaezelX 4eae51992e shapes are optional for projectiles. not mandatory.
and stop yelling in the console mid way through loading.
2025-07-07 16:49:56 -05:00
marauder2k7 ff442f5230 keep same naming 2025-06-20 17:13:20 +01:00
marauder2k7 fd7342668c streamline shape asset
shape asset now has the same import "@" as image asset
cut out extra filename parameters that arent needed
refresh hopefully fixed
2025-06-20 15:58:20 +01:00
marauder2k7 ca1604170d initial commit
change the macro to use the refactor (exact same structure as the imageasset macro)
2025-06-19 13:34:07 +01:00
JeffR 8ed3bab44c Re-added prefix handling for named texture lookups for image asset fields
Changed render-out of shape preview images to use png
Added filter against previewCache folder
2025-05-28 17:47:23 -05:00
AzaezelX 5ff83138cf need to set state to ok post-load and pre-changesignal callback 2024-04-06 16:39:31 -05:00
AzaezelX 3ace31c68c crashfix work for hot-editing shape assets tied to tsstatics 2024-04-06 14:48:22 -05:00
AzaezelX 1cf754dbca asset load refactor
genral load method, now returns loadedstate across the board
2023-11-12 16:33:17 -06:00
AzaezelX e6c2fe78fb generateCachedPreviewImage needs loadShape() 2023-10-21 15:15:27 -05:00
AzaezelX a8d640e311 clean up redundant loads, shift first load to getResource methods for sound and shape.
still need to properly sort image
2023-10-09 14:41:14 -05:00
AzaezelX b710a309bd asset load flow work
add reloading state to asset tracking,
convert most asset.isnull() checks on over to skipping out unless the errcode is ::Ok, or ::UsingFallback
add more errstriongcodes to hook up
skip load<type> execution if the asset loaded state is ::Ok
2023-10-08 13:19:43 -05:00
AzaezelX 0d4221fa59 uninitialized and unused value cleanups
(cherry picked from commit 1f08602cf0ad84409cd8b3520510f9c6ce7d5f9c)
2023-05-01 10:40:02 -05:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
Areloch 74ac45e877 Fixed Edit button tooltip for Shape Asset field
Disabled Edit button on image asset field as there's no current image editor
Fixed positioning of edit buttons to align with preview
Fixed horizontal sizing for the edit control so it keeps to the width of the field
Fixed handling on the preview display so if an invalid asset is input, it clears the preview display to help indicate it's invalid
Disabled the MaterialSlot handling for TSStatics until it can be further refined
2022-12-08 23:45:56 -06:00
Areloch 6162c5da05 Updates the behavior and layout of the ImageAsset, MaterialAsset and ShapeAsset inspector field types to be clearer, with previews and obvious edit buttons
Also fixes drag-n-drop behavior from the AB into the image and shape fields to ensure they update as expected.
2022-12-08 20:00:55 -06:00
AzaezelX 8343c096df need to surpess billboard generation attempts on dedicated servers 2022-09-29 02:04:51 -05:00
AzaezelX 6ce2d4cd9e helps to report which asse... 2022-09-20 16:08:36 -05:00
AzaezelX 91d843b8bd correct constructorfile reference 2022-09-20 15:39:42 -05:00
Areloch cd82186231 Fixes setter issue for image/shape/material custom inspector fields where it was not correctly passing through the changed value from the Asset Browser select
Swapped the water's disableTrueReflections variable to be enableTrueReflections for simplicity and consistency(also fixed a persistent typo)
Swapped disableVerticalSync to be enableVerticalSync for simplicity and consistency
Swapped disableParallaxMapping to be enableParallaxMapping for simplicity and consistency
Fix click detection on slider mode entries for guiGameSettingsCtrl so the click position correctly matches the percentage
Fixed problem where postFX initialization would always exec default.postfxpreset.tscript, even if a level's got it's own preset, which can cause problems
Fixed range field type behavior so that editing the values applies in real time, and also consistently applies between slider and text field
2022-08-30 01:29:39 -05:00
Areloch ded99cd8cb * Fixes handling for Image, Material and Shape Assets' inspector fields so they properly work with non-object targeted inspectors, such as the PostFXEditor
* Updated PostFXEditor scripts to handle refreshing properly when certainl field types(assetId fields) are changed
* Adjusted display handling of slider values on guiGameSettingsCtrl to show 0.x decimal format instead of 0.xxxxx
* Fixed pad length of item names in guiTreeView for items that are marked to avoid console spam
* Fixed local offseting for popupMenus so scaled/offset window position doesn't cause the popup menu to offset from mouse click position(courtesy OTHG_Mars)
* Fix issue with terrain where, due to default value save validation, the global scope for the terrain collision list would be whiped when saving, causing players to fall through terrain. Moved to per-terrain convexLists
* Fixed issue with the core camera model mesh and updated references so camera bookmarks display properly
* Fixed console spam during asset browser initialization where it would try and expand the directory tree even though the dir tree isn't populated yet
* Fixed handling of Open File Location RMB menu action to properly deal with script and datablock types
* Removed unusuable "Create ___" asset type prompts from the RMB menus for the AB to avoid confusion
* Improved slider offset positioning for various popup sliders on editor toolbars
* Anchored the visibility popup menu to the button for more consistent formatting and better feel
* Shifted various visibility toggles from 'in place' on the menu buttons to functions, allowing it to also properly mark the menu entries as checked or not, improving usability
2022-08-26 15:25:17 -05:00
AzaezelX f0b218f1e2 fix shape errorcodes
corrects out of bounds flaw
2022-06-16 22:07:45 -05:00
AzaezelX 4a7104e5ea fix TORQUE_TOOLS = off compilation 2022-06-13 12:38:08 -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
AzaezelX 0136af477f getAssetIdByFilename loaded state fix
getAssetIdByFilename should set the <type>Asset->mLoadedState = AssetErrCode::BadFileReference; so we know we're using a fallback
2022-04-10 17:29:55 -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 ecd35df7e9 Implementation of updated handling of Legacy Project importer to better seperate out importer versions as well as more explicit processing of incoming content 2022-01-20 01:14:43 -06:00
JeffR b70faae38f Updates the handling of the baking of shape asset previews to generate them with support for view angle control to improve visibility, as well as supporting overriding of a material in the preview bake
Also utilizes the updated bake handling to have material asset previews render as a sphere shape asset, overriding with the material asset's material, improving distinction of what is a material asset vs image asset
Also updates the sphere preview mesh to be more generic and not only for reflection probes
2021-12-24 17:26:45 -06:00
JeffR a8b3d874a1 Fixes mapping of imposter images to be packed as part of the shape asset, and fixes paths to be formatted more sanely. 2021-12-10 00:01:26 -06:00
Areloch a5944aff19 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 16:40:15 -06:00
Robert MacGregor 74cc60508b * BugFix: More cleanup of MSVC compiler warnings. 2021-10-07 01:10:00 -04:00
Brian Roberts 0a150e342f
Merge pull request #545 from Areloch/AssetFileCaseSensitivityFix
Enforces filename string case sensitivity for assets' internal filenames
2021-08-23 19:22:22 -05:00
Areloch cfe122f714 Enforces filename string case sensitivity for assets' internal filenames, which avoids the stringtable messing with the case preventing file name case sensitivity issues. 2021-08-21 23:12:37 -05:00
Jeff Hutchinson 37dc8626f5 MacOS fixes
This fixes an issue where Con::getVariable can't be used in the global scope before the console system is initialized. I'm honestly surprised this error didn't happen on any other platform.
2021-08-21 20:48:26 -04:00
Areloch c76c5f7ee1 Removed unneeded duplicate of blank sky skybox
Fixed various inspector field editor button icons
Fixed drag-n-drop apply logic for material assets
Fixed up some convex shape editor material references
Fixed tools overlay gui profile opaqueness flag
Fixed uvEditor image asset binding/lookups
Fixed decal editor preview display
Fixed shape editor would you like to save your changes prompt
Added additional sanity check for bad material reference in tsMesh
Fixed saving of terrain asset when working in editor default level
2021-08-06 01:06:36 -05:00
Areloch 88ae8a9665 Added getShapeConstructorFilePath console function on shapeAsset
Fixed typo in import config settings for DuplicateAutoResolution
Converted TSShapeConstructor to utilize assets
Updated shape editor to work with assetified constructors
Converted guiBitmapButtonCtrl to use assets
2021-08-02 04:20:27 -05:00
Areloch 5525f8ecdd Converts all game, gui editor, and system classes to utilize assets
Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
2021-07-19 01:07:08 -05:00
Areloch 85a9a9b608 Implements shape preview caching for shape assets
Also standardizes the loading gui overlay so it can be used to inform that the asset preview generation is happening
2021-01-27 01:54:26 -06:00
AzaezelX 5e8862dafc further info by request 2020-12-31 19:38:53 -06:00
AzaezelX 6495ee16c6 report shape file location that failed to load, set loaded status to badfilereference if getAssetById can't even find noshape 2020-12-31 18:54:31 -06:00
AzaezelX b26c87491f need to ensure we've got an asset at all before setting the loaded state 2020-12-14 13:33:49 -06:00
AzaezelX 8bb43dd5ae error string interpreter, example of usage in shapebase::preload, plus flips the datablock filter back on to save some network bandwidth. 2020-12-03 15:37:51 -06:00
AzaezelX 220771d2fe variation on #387 that also introduces errorcodes 2020-12-01 19:16:36 -06:00
Areloch 8fbad31b43 Fixes the hook-ins so when a shape asset is changed, tsstatics now are correctly triggered for a reload 2020-09-13 17:57:19 -05:00
Areloch 69bfbb0978 Adds functions to get the full path for level and shape asset files
Updated choose level UI to use getLevelPath function so it works again
Added a check for mis.dso for choose level UI as well in case it was compiled
Updated open asset in shape editor logic to use getShapeFile so it works again
Fixed on-exit crash after drag-n-drop importing of assets into the AB by properly using the import config object as a pointered object
Added sanity check when inspecting a TSStatic, if there isn't a materials inspector group for whatever reason to prevent a crash
Added filter logic so if in select mode for a specific asset type, it won't show datablocks, prefabs or other loosefiles
Removed unneeded setting of AB's current address path when creating a new terrain material asset
Added logic for forcing field validation in the create a new asset window. This fixes a problem where if you'd typed in a field but didn't hit enter and then immediately hit the done button, the typed string wasn't used.
2020-08-12 13:11:13 -05:00
Areloch 813762c722 Separated ShapeAsset's fileName for the loose file name and the fully processed file path to avoid potential save-out problems
Fixed autoAssetImport so it properly cleared any prior import session objects
Added beginning and ending comment line signfiers to make import logging easier to spot in console
Fixed variable used when doing the actual import on assets where it would use the top-level asset import objects and not the children array, causing a crash
Fixed the Make Selected A Mesh logic to work with the creation of a new shapeAsset
Added secondary handling to generate a prefab of the original selection for preservation purposes
Added optional input for makeSelectedPrefab to not delete the original selection(useful for the preservational prefab mentioned above)
Adjusted font color for NA text edit fields to make it more legible
Changed the non-working reloadDatabase button in assetBrowser to instead open the Asset Editing editor settings page.
2020-08-07 00:24:26 -05:00
Areloch 4ce558f042 Reworks the terrain loader code to work with the assets.
Fixes the terrain asset creation, makes the loading logic go through the asset auto-import behavior when a filename or assetid is bound that is not found.
Corrects terrain material binding to properly save and load
Makes the terrain asset inspector fields work as expected.
2020-06-25 23:33:01 -05:00
Areloch 9b7b09dce8 Adjusts the ShapeAsset autoImport invoke logic to actually use the C++-side autoImport logic
Changed originalImportingAssets to originalImportingFiles in the AssetImporter for naming clarity
Made autoImportFile properly return the assetId that was made
Additional logging in the AssetImporter
Adjusted the asset registration logic to support reimports, which merely refreshes the assetID
Added logic to shape asset importing to be able to import in an existing companion constructor cs file
Tweaked the TSStatic setShapeName logic so it will properly set fields depending on if the assetID was correctly set, or if we have the noShape fallback in use
2020-05-17 01:38:17 -05:00
Areloch 157b114ec7 Added ImageAsset type mode for cubemaps.
Added new inspector type TypeShapeAssetId which is processed as a assetId string instead of an AssetPtr.
Added utility function to ShapeAsset to getAssetIdByFilename, which lets you find - if any exist - the asset that utilizes a given loose file. If it doesn't find one, it can attempt to run an auto-import if the editor settings allow, then proceed.
Fixed callback of the shapeAsset inspector fields so the Open in Shape Editor correctly binds the asset's shape to the editor for modification.
Added function to open a shapeAssetId in the shape editor to facilitate the above.
Added additional check to findShapeConstructor to look up the full path of the shape in the cases where a full path is provided instead of a local path. This prevents the shapeConstructor from not finding shapes that absolutely exist.
Added beginnings of Datablock representation in Asset Browser.
Fixed a few minor issues with asset auto import causing false positive errors, preventing Import or erroneous logging.
Fixed issue where editing of asset import configs didn't save.
Fixed logic of materials in asset browser so they will open in the material editor as expected.
Re-enabled AutoImport of assets editor setting by default.
2020-04-15 12:15:12 -05:00