Commit graph

369 commits

Author SHA1 Message Date
marauder2k7 74638c0f2c Asset data management
Added functions to AssetManager to pack/unpack assets using an id hash instead of their id string this cuts down how much data is sent across the network for assets

All asset macros updated to use this new functionality.
2025-12-09 10:05:39 +00:00
JeffR 66f924ebd4 Updates TerrainMaterialAsset to utilize similar macros to everything else
Updates groundCover to utilize TerrainMaterialAsset macros in place of straight StringTableEntry for type layers
Fixes formatting for several asset types' inspector fields so they correctly call down into prompting the AssetBrowser being shown with correct field naming, thus allowing fields that are arrays to have the right index when setting the target variable
Updates several asset helper macros to handle blank values for network traffic to actually be sent to client, thus allowing setting an asset to blank on the client, rather than only falling back
2025-12-03 00:33:14 -06:00
AzaezelX 9bcf8a90b2 dsq detection filters 2025-11-25 19:03:38 -06:00
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 2316c164e9 change per slot maxdistance to maxSlotDistance
it conflicts with the general xaxDisance
2025-09-30 17:14:30 -05:00
marauder2k7 10acab1b07 more fixes
DSQ Fixes
2025-09-23 19:09:20 +01:00
JeffR 11548d2630 Added early-out check if we're already successfully loaded 2025-09-15 21:26:56 -05:00
JeffR ce1be5e881 Makes sure the loading code for terrain assets is properly assigned.
This ensures stuff like saving works properly.
2025-09-15 21:16:34 -05:00
Brian Roberts e73efc13c4
Merge pull request #1541 from Areloch/MiscFixes_20250825
Misc small fixes, improvements and QoL tweaks
2025-08-26 01:43:57 -05:00
JeffR 9c654d7932 - Fixes the display of the preview in the MaterialAsset fields
- Hides the special-case direct filepath field for ShapeAsset persist fields macro
- Shifts the handling of TSStatics so the shape instance will load materials on the server as well as the client. This opens gameplay options as well as allowing rebaking of meshes functionality more easily
- Expands AssetBase's isValidAsset utility function to actually check validity instead of just returning true
- Adds isValid utility function to AssetPtr
- Added new field flag that makes the field not write out to file
- Removed legacy iconBitmap field from GuiIconButtonCtrl because it was causing errors
- Fixed group filtering check of guiInspector to ignore case
- Removed unneeded isFile checks for common datablock script files in Prototyping module script
- Removed test datablocks from Prototyping module
- Removed unnecessary container control from AssetBrowser
- Adjusted preview regen logic of AssetBrowser so it doesn't trip if you're simply resizing the window
- Fixed issue where row-vs-column layout logic for AssetBrowser when resizing window was fiddly
- Added handling for when Dragging and Dropping datablock from AssetBrowser to spawn, it'll prompt if it spawns the actual object, or a spawnsphere that spawns said object. In the event of an PlayerData will also prompt if it should spawn an AIPlayer
- Added ability to take a TSStatic that uses a baked down mesh and are able to restore it to the cache prefab, or trigger and in-place rebake to refresh it if something has changed in the original contents via RMB menu on the scene tree
- Added ability to explode prefab to RMB menu on scene tree
- Added ability to convert selection to prefab or bake to mesh in RMB menu on scene tree
- Tweaked sizing of the DatablockEditorCreatePrompt window to not have cut off elements and easier to see/work with
- Added sanity check to datablock editor creation
- Fixed preview display of material in Decal Editor
- Made compositeTextureEditor use the cached preview of images
- Fixed sizing/spacing of gui selection dropdown as well as resolution dropdown of GuiEditor
- Fixes MaterialEditor to properly save the group collapse state when editing
- Adds ability to in-flow edit and create datablocks in the NavMesh Editor for the testing panel, and makes the datablock dropdown searchable
- Fixed issue where opening the ShapeEditor via the edit button on a ShapeAsset field would cause the action buttons on the top bar to not show
- Fixed error in shape editor where when exiting it was erroneously checking for a clear value of -1 rather than 0
- Removed unneeded top tabbook and tab page for main editor panel
- Fixed issue where reset button of TerrainBrush Softness Curve editor didn't actually reset
- Resized Object Builder window to not cut off elements and have enough width to show more data
- Added a TypeCommand field type to Object Builder and changed spawnscript field of SpawnSphere to use it rather than a simple text edit field
- Allow SpawnSphere in ObjectBuilder to be passed in spawn class and spawn datablock default info
- Injects button to controllable objects when Inspecting them to make it easy to toggle if you're in control of it or not
-
2025-08-25 23:35:28 -05:00
AzaezelX 3123935472 correct DECLARE_<foo>ASSET assigns
use string compare there, not pointer compares
2025-08-21 15:40:07 -05:00
JeffR f3cad0d77e Converts the ad-hoc design of the Material Editor to utilize the same inspector interface as most everything else does.
- Overhauls the material editor to simplify and streamline the logic behind it since the inspector does most of the work
- Tweak a few order positions of materialdefinition fields to work better
- Sets AO, Rough and Metal channel fields to use an enum type for human readability
- Updates the MaterialPreview gui control to work with assetIds
- MatEd now supports setting of parent material to inherit from
- Creating a new material now can prompt selecting an existing material to inherit from
- Can now edit the mapTo value of a material in the matEd
- New standalone Composite Texture Editor window for convering AO, Roughness and Metalness maps in a material to an ORMMap
- Can also star the creation of a composite texture via RMB context menu in AB on an image asset
- Moved logic of CubemapEditor from MatEd to it's own stuff
- Made ImageAsset fields now be more clear when they have nothing assigned, and also have a clear button to empty the field's value so it's consistent across the board
- Reorganized the layout of the gui and image files for the MatEd to be easier to navigate
- MaterialEditor now overlays the EditorGUI instead of being forcefully embedded in it, allowing easy editing of the MatEd Gui via the Gui editor
2025-08-03 12:03:02 -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
AzaezelX e8ccb3443a try to load shapes during preload
it's half the point of the protocol
2025-07-06 19:51:55 -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 542563feaf Update ShapeAsset.h
fix linux and mac being pedantic about NULL = 0
2025-06-19 17:32:09 +01:00
marauder2k7 08f52cfa16 add extra checks
add extra checks around an empty stringtableentry for assets and bitmap controls
2025-06-19 16:58:44 +01:00
marauder2k7 5d641929cf player and ground cover 2025-06-19 14:10:00 +01:00
marauder2k7 c6ec2fd6a1 Merge branch 'PreviewAssets_UseAsset' into SoundAsset_Refactor 2025-06-19 13:36:49 +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
marauder2k7 45f1447d2b Update ImageAsset.h
add check for if _in matches the filename that is already set for image asset, this stops the set being called twice when loading the same image asset
2025-06-19 07:53:32 +01:00
marauder2k7 794a8c900d Update ImageAsset.cpp
add change notification on intialize asset use this callback to update information about the image on refresh. Remove notification when the asset is removed and when the imagefile changes
2025-06-17 16:49:07 +01:00
marauder2k7 48b512ef73 move population of image metadata to onAssetRefresh 2025-06-17 15:06:07 +01:00
marauder2k7 3d77b59b71 Update assetImporter.cpp
refresh asset so image asset can write out its image metadata
2025-06-17 14:57:18 +01:00
marauder2k7 67f217ada1 Update assetImporter.cpp
asset importing for images shouldnt execute a file copy, original file path is enough as it is relative to exe
2025-06-17 12:20:47 +01:00
marauder2k7 fc9f221ac0 Prepend symbol for image files
Prepend image filenames in imageassets with "@" symbol so expand and collapse works correctly for files relative to that asset.taml file.
2025-06-16 08:33:11 +01:00
marauder2k7 50f74368b3 various fixes around preview assets and imageassets text field
Imageasset text field now displays correctly in inspector
previews now use assets again
assetBrowser hides previewCache folder
2025-06-15 22:07:12 +01:00
AzaezelX a3d2d13d39 remove stray methods.
revisit loadedstate shortcutting of already loaded textures
2025-06-01 12:41:31 -05:00
JeffR 0e6c33f78a Fixed gui editor drag and drop behavior for image, shape, and sound
Ensure BitmapFile is given a proper default
2025-05-30 20:21:13 -05:00
JeffR 41957cb98f Compares path and filename, excludes png in case the user swapped a dds for a png or the like 2025-05-29 16:06:04 -05:00
JeffR 029427d51c Fixes imageAsset lookup so if we're looking up a full filename path, we compare the actual full paths 2025-05-28 23:23:08 -05: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
JeffR 0fa8b97f91 Reimplements ability to utilize direct file load alongside ImageAsset fields when utilizing the ImageAsset macros
Updates Asset Browser generated preview images to not utilize full assets, but just the preview image files themselves
2025-05-27 17:12:03 -05:00
JeffR bb7ee38bf4 - Reimplements autosave logic to handle levels, subscenes and terrains in a more consistent, reliable way.
- Adds entry to RMB menu in Asset Browser to restore an asset to a backup copy taken from autosaves
- Adds reparent out-of-bounds objects button to SceneGroup inspector
- Adds ability to have SubScene have a different loading bounds from the actual subscene bounds, allowing load triggering to happen ahead of the bounds of the subscene itself
- Fixes asset importer handling of animFPS field to be the correct type
- Adds onInspect handling to GameBase allowing better handling for any game class type with editor integration
- Add getAssetLooseFileCount and getAssetLooseFile to AssetManager to be able to iterate over all loose files associated to an asset
- Add standard/default preload function def to forestItem
- Fixes handling of text placement on GuiIconButtonCtrl when text is set to the right
- Adds setGlobalCenter utility function
- Adds ability to set guiInputCtrl active state
- Matched util functions for tracking if left and right mouse buttons are down to EditTSCtrl alongside the existing middle mouse
- Add empty element sanity check to appMesh loader
- Add callback for GameBase when game is created
- Add default graphics options config for steamdeck
- Fix typo in assetImportConfig default
- Filters SceneGroup utility buttons in inspector to only show for relevent class types
2025-05-25 07:40:10 -05:00
JeffR cac068d2c5 Adds the necessary ifdef flags to re-enable the ability to build with tools disabled 2025-05-17 18:41:15 -05:00
marauder2k7 a9240b87f4 Update assetImporter.cpp
image asset importer was doubling up on the filepath.
2025-05-16 08:14:25 +01:00
marauder2k7 6870a040e2 purge assets and clear image
image asset was missing a clear, passing a null value should clear the image asset and set it to null on materials.
2025-05-14 00:57:38 +01:00
marauder2k7 aa3f07e339 update macro
Added get##name##File to macro that will check to make sure the asset is not null before getting the image file.
2025-05-14 00:30:47 +01:00
marauder2k7 a52069bbc5 processed material null ref
processedMaterial was not checking to see if each asset was null before getting the image filename inside the call to _createCompositeTexture
2025-05-13 23:46:54 +01:00
marauder2k7 f86497434e is named target
clear out texHandles on teardown of imageAssets.
2025-05-12 22:17:01 +01:00
Brian Roberts 6cda97867c
Merge pull request #1452 from marauder2k9-torque/MEMORY-MANAGER-REFACTOR
Memory Manager Refactor
2025-05-12 15:31:06 -05:00
marauder2k7 e1c01cd49a Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3 2025-05-12 14:45:41 +01:00
marauder2k7 15ff382469 plugging found leaks
LEAK from G:\GameDev\GithubRepo\Torque3D\Engine\source\console/consoleObject.h:686
- leak around props remaining after the const_cast free it up

LEAK around sound asset
- assetEnumNameConcat was creating a leak.
2025-05-12 11:50:16 +01:00
Brian Roberts 798936ebd2
Merge pull request #1325 from Areloch/Standardized_AB_AssetManagement
Updates most of the handling of asset types to follow a more standardized type-registration system.
2025-04-29 13:19:50 -05:00
JeffR f31acf774e Adds handling for datablocks to be reloaded if the assets they utilize have their files directly edited. 2025-04-24 00:58:20 -05:00
marauder2k7 7c4d41ee21 Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3 2025-04-05 15:59:02 +01:00
AzaezelX b299b54467 encapsulate tool-only code for levelassets 2025-04-02 15:38:43 -05:00
JeffR 5566f8a396 Updated handling of subscenes in assets to be it's own distinct definition to avoid parsing and detection issues, as well as fields to be handled distinctly between the types 2025-03-30 16:36:15 -05:00