Commit graph

104 commits

Author SHA1 Message Date
AzaezelX 4579f327b4 network reductons
first pass, tsstatic
sceneobject under review
2025-10-22 23:35:35 -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 e8ccb3443a try to load shapes during preload
it's half the point of the protocol
2025-07-06 19:51:55 -05:00
Brian Roberts f1cf4147a8
Merge pull request #1506 from marauder2k9-torque/SoundAsset_Refactor
Shape Asset Refactor and Image Asset fixes and tweaks
2025-06-21 21:09:28 -05: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
AzaezelX 17187f4fc2 reduce tsstatic netload
don't bother transmitting animation configs if we're either not animating, or unable to do so
2025-06-19 22:42:31 -05: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
AzaezelX b4eb885aae fix forceDetail
it can safely be a negative number.
2025-03-19 18:08:37 -05:00
AzaezelX f633ef3a3d fill in the validated variables 2025-03-09 11:53:23 -05:00
AzaezelX b36ec14194 add typeS16 2025-02-22 18:57:27 -06:00
AzaezelX e2a0fbefa3 add lod selection for visiblemesh collisions
add box filtering for visiblemesh buildPolyList
2025-01-27 15:37:05 -06:00
AzaezelX 9aa45b24ba for consistency, add a setSkinName method to tsstatic
wrapper for obj.skin assignment just like shapebase
2025-01-09 08:09:59 -06:00
AzaezelX 40d38cc1ec uneeeded 2024-04-06 16:48:02 -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 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 0ce2da3a23 clean up math varsize complaints 2023-04-27 16:10:04 -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
AzaezelX f07c8745b2 inspector cleanups
clustering work for datablocks for both consistent scanning for object parameters, as well as an eye towards orgainizing things to make reviewing what variations of components we'll be needing down the line clearer
2023-01-24 17:12:23 -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 a75c64fef3 tsstatic aug cleanups
1- adds a hasNode method to see if a named node exists
2- cleans up getNodeTransform nomenclature and notes, and adds safeties
2022-08-07 15:16:08 -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 663335e556 TSStatic::updateMaterials() crashfix 2021-11-27 14:29:30 -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
AzaezelX 19e4643707 new method tsstatic.getNodeTransform
used to look up a given node's transform by explicit name in a tsstatic object
2021-11-03 21:15:00 -05:00
AzaezelX 98a079a797 code duplication prune. should aid in stability 2021-10-03 02:56:26 -05:00
Areloch adec6e7c74 Adds load status to MaterialAsset for if the Script file itself has been loaded, but the material itself hasn't yet been processed.
Fixed String -> StringTableEntry conversion in prefab file to correct corruption when setting the filename
Cleaned up message spam from the MaterialSlot fields on TSStatics
Added getter/setters for terrain file and assets
Removed unneeded exec of tools profiles for MainMenuGUI
Add logic to remove creators section of AB if in select mode
Fixed misc. messageBox invokes that were erroneously converted to 'toolsMessageBox'
Fix classname for NotesObject in AB Creator Entry
Fix issue where ConvexShapeEditor toolbar would hide after being seen once
Changed keybind for quick AB access from 'space' to 'shift space' to avoid input issues when typing in fields in some cases
Fixed default image assignments for River objects on foam/ripple/depth
Added handling for Material, Sound and Shape asset fields in Object Builder, and updated various objectBuilder class entries to utilize them now.
Updated various fields' defaults for ObjectBuilder to utilize correct assetId's
Fixed editor SceneTree tooltips for TSShape and GroundCovert to correctly reference assets as needed
Added logic to properly check terrain asset validity when prompting to save changes, which would break saving actions before
Added menubar items in the Object category to take control and release control of control objects quickly for testing
2021-09-19 01:01:47 -05:00
Areloch 8781f2ab55 Add getScriptPath console function to GUIAsset
Shifted tracking of importing asset status to an enum for more robust handling
Added logic to properly init freshly created shapeConstructors with the newly imported shapeAsset
Fixed handling of assets that have been marked to be skipped, but needed to fill in the parent's dependencies(UseForDependencies enum value)
Cleaned up redundant recursive logic for importing assets
Disable Create Game Objects button in inspector
Fixed material assignment for convex proxies
Updated asset icons for AB with WIP images to be more clear
Fixed issue where type-generic icons in the creator items in the AB weren't showing correctly.
Force AB to show creator entries in list mode for efficiency and avoid icon scaling issues
Moved creator functions for AB to separate file for convenience
Filled out GUIControls in the AB's creator mode, and context world editor and GUI creator entries based on active editor
Added drag-n-drop handling for guiControls via AB creator in guiEditor mode
Added more types' profiles in the AB gui profiles to give more unique border colors for better visual clarity of asset type
Added editor setting to indicate if the editor should load into the last edited level, or the editor default scene
Fixed setting of highlight material overlay in shapeEditor
Added global keybind for GUIEditor so space also toggles assetbrowser
Fixed up binding/finding of shapeConstructor by assetId, which also fixed displaying of shape's material listing
2021-09-10 02:13:56 -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
Brian Roberts e5014fb24e
Merge pull request #212 from Azaezel/alpha40_export_LOD_rounding
export rounds LODs to the nearest power of 2
2020-10-03 11:25:53 -05: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 c5bccd8ff4 Adjusts getUtilizedAssets writeout so it more consistently prints out the dependent assets
Adds handling for prefabs with getUtilizedAssets
2020-09-08 01:04:41 -05:00
Areloch 0b954459a3 Added recursive scanning for utilized assets on any object within the scene, soas to catch objects in simgroups or parented
Disabled initial materialSlot fill-out until logic for looking up assetName from material list name can be done to avoid 'unable to find assetid' spam
Added function to SimGroup to easily acquire child object by index
Some minor cleanup of commented lines in asset browser
Fixed forward/backward navigation arrow behavior in asset browser
Fixed double-click navigation when the AB is in select mode
Fixed erroneous 'could not acquire asset' messages when navigating folders in AB
Added editor setting for UseGroupSnap snap option and integrated it into the UI interface
Removed some duplicate settings from the EditorSettingsWindow
2020-09-02 01:26:43 -05:00
Areloch 40dd926873 Adds function for sceneObjects to report utilized assets
Add reporting of used assets to tsStatics and TerrData
When saving a Scene, it will write static object asset dependencies to it's levelAsset
Shifted level loader logic to pass up the levelAsset rather than full level path
Made it so when level is loading, the levelAsset loads its dependencies. When the level is ended, as part of cleanup, they are unloaded
Shifts defaultEditorLevel to be an actual asset and made the ToolsModule load assets
Fixes the Save As action to correctly save out to the new level asset
Fixed the autoLoadAssets logic to be cleaner and not manually check types
Removed extra, unused DefaultEditorFile file
2020-08-19 18:30:42 -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 b9e16649d9 Slims down the obj size get math to just use the worldSphere radius rather than computing the bounds width to save cycles. 2020-08-03 18:12:21 -05:00
Areloch a257dc8399 Adds some console preference variables for object fade overriding on TSStatics 2020-08-02 22:33:10 -05:00
AzaezelX fcffca65e6 #include "console/typeValidators.h" 2020-07-03 22:58:27 -05:00
AzaezelX 136bc8874f adds an animspeed and animoffset to tsstatic instances so clones can be set to break up syncing on multiples 2020-06-13 12:08:01 -05:00
AzaezelX afd836cc56 export rounds LODs to the nearest power of 2
prevent submeshes from flickering in and out due to lod mismatches when exporting groups to a singularr model file
2020-06-13 11:58:16 -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
AzaezelX e9415a0994 uninitialized variables-collision 2020-05-11 14:33:59 -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
Areloch 7029024b8e Updated TSStatic to utilize the getShapeAsset utility functions, and shifted the loader logic to utilize ShapeAssets exclusively, having straight file names go through the utility function to find/process a relevent asset. 2020-03-21 00:36:49 -05:00
Areloch 9c381caea2 Added initial implement of Image Types for GFX resource management
Added logic to intercept TSStatic setting shape to try and utilize a shapeAsset if it can find a matching loose file
Added lookup logic for getting any textures inside collada files to streamline asset importing logic
Fixed modal behavior for Import config and import window
Initial implementation of loose file/legacy file importing
Adjusted Asset Browser and Asset Import refreshing behavior to queue to improve performance by avoiding multiple refreshes as well as potential infinite loops
Fixed volume visibility behavior
Fixed physics world viz toggle
2020-02-17 00:32:50 -06:00
Areloch f7b891442a Updated path handling for loose asset files for CPP, Image, Level, Material, PostFX, Shape, Terrain, TerrainMat and StateMachine assets to be more predictable in when and how they expando the loose file path into a full, useable path
Fixed loose file bindings for all associated slots in level asset, such as postFX file, decals, etc
Expanded TSStatic onInspect testcase to parse materialSlots and hook-in a specialized material field for editing/quick reference from the inspector
Adjusted expand behavior of guiTree to be more reliable
Added internal name 'stack' to inspectorGroup's stack child objects for easier access to add programatic fields
Removed redundant PreMult translucency type code
Added setting of feature so probes work when in forward/basic lit mode
Corrected indexing error in SQLiteObject class so it properly parses with the updated console API
Tweaked the FOV setting logic in GameConnection::onControlObjectChange to not be spammy
Fixed var when trying to bind the camera to the client
Added project setting field to dictate the default render mode between Forward or Deferred
Integrated MotionBlur PostFX into updated PostFX Editor paradigm and exposed the samples uniform as an editable field
Integrated DOF PostFX into updated PostFX Editor paradigm
Updated setting group name for vignette postFX
Shifted shaderCache to be in data/cache along with other cached files
Added helper function to replace strings in a file
Fixed ExampleCppObject asset to have correct loose file references
Adjusted editor default level logic so it can be modifed and then stored, as well as reset back to the original default
Fixed verve reference to root scene group
Adjusted location of a nonmodal gui profile so it loads at the correct time
Reorganized AssetBrowser loading and refresh logic so it doesn't stack multiple refresh requests back-to-back causing lag
Updated the search behavior to search not just the current address, but all child folders as well, making it far more useful
Initial work into zip and folder drag-and-drop asset importing support
Removed the import config setting for 'always display material maps' as it is redundant with the new importer context menu actions
Updated example asset type file
Ensured all asset types have proper handling for move, rename and delete actions
Fixed double-click behavior on folders in the AB
Fixed CPP asset preview
Added better logic to discern if a top-level folder belongs to a module or not in the AB directory browser
Added ability to convert a non-module top-level folder in the AB into a module
Added initial hooks for being able to generate a new Editor Tool, similar to how the AB can generate modules
Renamed CPP asset template files to have the .template so they aren't accidentally picked up by cmake
Fixed convex editor's material handling to work with AB and reference back properly
Updated AB images for folder up/down navigation buttons, and the breadcrumb divider arrow
Made PostFX Editor properly allow for input pass-through so you can still edit the level with it open
Added some additional common text gui profiles
Disabled calls to old editor settings logic in various editors to remove spam
Added callOnModules call so tools can initialize properly when the world editor is opened
Fixed logic test for visualizers
Added ability for cmake to scan tools directory for any tools that add source files
2020-02-04 01:47:28 -06:00
Areloch a43233d9c9 Updated move folder behavior to better update the module and asset databases of changes
added dynamic reload on editor profiles when the theme is changed via editor
Adjusted direct filename fields to just be hidden, not disabled(avoids breaking legacy content)
Added ability to update asset references in a given folder path
Added WIP ability to scan for and update module dependencies
2019-12-08 15:54:37 -06:00
Areloch 09c651c26d Corrected profile for GameObjectAsset type field button
Initial implementation of changeable TSStatic materials via material slots and drag and drop of material assets onto world editor from AB
Updated Volumetric Fog to support ShapeAsset for it's model data
Added cmake option to hide literal filename fields if the class supports asset fields for the same input
Added light viz modes to see diffuse, specular and detail lighting modes(currently just sun)
New raycast console function to return back material of hit object
Moved GameObject logic to SceneObject and started fixing up of editor behavior to allow any SceneObject to be converted into a GO, along with all supported behavior such as instance-template management and spawning GO via drag-and-drop from AB
Fixed inspector field tooltip text to be positioned in inspector footer properly again
Drag and drop of shape asset attempts to drop at raycast position now, instead of just at the camera ray position
2019-12-05 20:42:47 -06:00