Commit graph

81 commits

Author SHA1 Message Date
AzaezelX 4f639a16b5 trip onadd in additional places
by request,
adds a per object-instance onadd for datablocks if an object instance *also* defines a class.
be mindful not to mix up which namespace is in use there, as you can not tag two different core class instances the same scripted class
implements the same with the same restrictions for simobjects in general
2025-12-27 09:02:21 -06: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
marauder2k7 8f856dd7cd build fixes missed by copy over 2025-05-12 11:50:14 +01:00
AzaezelX 4ba93dafc3 Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into aiSubsystem 2025-05-03 15:25:36 -05:00
AzaezelX 62aadf9114 isobject and obj.delete safties
isobject isn't actually one if it's yet to be properlyAdded, or already marked with isRemoved
likewise don't try and delete a deleted thing
2025-04-29 16:45:25 -05:00
AzaezelX 3210325f3f elevated mAicontroller to shapebase
aiwheeleedveiclecontrollerdata resolvespeed now only touches throttle
objects assigned aicontrollers now reflect that by thier objecttype
basic flocking
2025-04-19 04:25:36 -05:00
AzaezelX 011a8906ff skip trying to be clever and just report the variable name being checked directly 2025-03-18 03:13:37 -05:00
AzaezelX 64103a58aa enum value listing
show the string value of masked enums in variable entries
also sort the combo case of scrolling and rotating materials
2025-03-06 19:04:22 -06:00
JeffR e2d0cc1981 Fixes issue where Regenerate Bounds button for SceneGroup/SubScenes wasn't displaying by moving it to Editing inspector group
Added mode toggle for if changing the transform influences the child objects of a SubScene or not
Added onSelected/onUnselected callbacks for SimObjects to allow contextual behavior in the editor
Added functionality of programmatic/dynamic Tool Button Palettes
Added logic so when selecting SubScenes the world editor palette has new buttons for letting the move/rotate actions influence the child objects
2024-11-05 20:14:36 -06:00
AzaezelX eaa09a6db7 corrections:
fill in missing SceneObjectTypes enums.
parity with simobject.cpp and objecttypes.h
correct inspector display
2024-07-24 20:43:36 -05:00
Areloch b77911bdcd Exposes the SceneObjectTypeMasks as an enum type, allowing it to be utilized in inspectors.
Updated Trigger triggeredBy field to utilize new enum type for editing
Updated MaterialDefinition's animFlags field to utilize appropriate enum type for editing
Fixed image reference in bitmask inspectorField type to use correct image asset name
2024-05-04 09:56:04 -05:00
Areloch 51c1ab6b83 Adds a sanity check to SimObject's setFieldValue console method so if you pass in a blank field name it doesn't crash, instead asserting in debug, and logging the error in release 2024-04-19 00:00:37 -05:00
marauder2k7 2b295fb7f0 rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
2024-03-18 18:40:22 +00:00
AzaezelX 5791ee68a7 adds a getFieldCountNS and getFieldNS method to allow field lookup by namespace 2023-12-24 03:15:56 -06:00
AzaezelX b03cb4c49b add a getMethodSigsNS
takes a namespace as an explici value fed to it as oposed to inferring from an passed object
2023-12-24 02:46:26 -06:00
AzaezelX 428f22d728 Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into classPrototypingPresenter 2023-12-23 21:29:17 -06:00
AzaezelX 78147821a0 filter inspector buttons out of the following:
PersistenceManager::updateObject
SimObject::writeFields
SimObject::assignFieldsFrom
DefineEngineMethod( SimObject, getFieldCount, S32, (),,
DefineEngineMethod( SimObject, getField, const char*, ( S32 index ),,
SimObject::writeObject

do not do so for
SimObject::setDataField
DefineEngineMethod( SimObject, dump, void, ( bool detailed ), ( false ),
2023-12-19 23:29:46 -06:00
AzaezelX c10808873d hook PrototypeClass(%objectName) on up to inspector
fix dialog close, fix dynamic variable gui element alignment
2023-11-24 15:44:54 -06:00
JeffR 92743f6fd8 Adjusts the logic for when creating a simObject from a taml so that array elements(like material slots or sound asset slots) properly can handle prefixed field values, such as referencing loose asset files. 2023-10-20 17:51:49 -05:00
Lukas Aldershaab 5615cc33d8 Remove CInterface script hooks, superseded by console refactor 2023-09-27 14:11:13 -05:00
Lukas Aldershaab 89b0c7f73b Console Refactor 2023-09-13 10:33:20 +02:00
AzaezelX 25e96b613b better callback filtering for getMethodSigs
add a bool filter to getMethodSigs so it can also return script commands

example code reminder note:

//MainMenuGui.getPrototypeList();
//MainMenuGui.getPrototypeDef("onAdd");
function simObject::getPrototypeList(%this)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = getRecord(%methodArray.getValue(%i),0);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         warn(%methodName);
      }
}

function simObject::getPrototypeDef(%this, %funcName)
{
      %methodArray = %this.getMethodSigs();
      %methodCount = %methodArray.count();
      for (%i=0;%i<%methodCount;%i++)
      {
         %methodDef = %methodArray.getValue(%i);
         %methodName = strreplace(%methodDef,"::"," ");
         %methodName = getWord(strreplace(%methodName,"("," "),2);
         if (%funcName $= %methodName)
            warn(%methodDef);
      }
}
2023-03-15 00:14:20 -05:00
AzaezelX 7872f01689 since we do in fact allow arbitrary tack on variables to scriptobject derivatives, and thus tamls, reporting theres a non hardcoded variable entry is actively counterproductive to flexibility.
plus minor format fix
2023-03-07 16:10:46 -06:00
Brian Roberts 59ed9ee7b6
Merge pull request #982 from Areloch/OnInspectEditorLogic
Adds logic and handling for Inspected SimObjects to be able to injectnew InspectorGroups and InspectorFields when being inspected for editing.
2023-03-04 20:07:25 -06:00
Areloch 3991019912 Adds logic and handling for Inspected SimObjects to be able to inject new InspectorGroups and InspectorFields when being inspected for editing.
Allows for expanded editing capabilities of existing classes without needing to add static fields to classes
2023-03-04 19:04:44 -06:00
AzaezelX a8e74787b7 new method, getMethodSigs. spits out callback proto-functions 2023-02-15 17:38:45 -06:00
AzaezelX 1b33b01eb1 add "docsURL" filter to assignFieldsFrom to prevent it from triggering opening web pages when inheriting values 2023-01-28 16:12:05 -06: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
Jeff Hutchinson 1940becb2d Compilation fixes for C++20 2022-11-28 21:39:06 -05:00
JeffR a0f8b29da7 Improves logical checks for the default value so it's more sane and stable
Allows creation of polyhedrons via constructor with a origin and vector format, allowing to have default polyhedron values on triggers and physical zones
2022-02-14 01:07:39 -06:00
JeffR 696c2e2eec Add sanity check for default value results checking when filtering out default values
Add additional utility functions for updating parsed object data in the project importer
Adds logic to find and associate FX materials to their terrainMaterials and adding them to the terrian material asset if found on project importer
2022-02-02 01:11:33 -06:00
JeffR b4e346aa3f Adjustments to save out code when writing fields such that if the TAML writer is marked as not writing defaults, it doesn't. And makes the regular simobject save out not write default values as the default behavior 2022-01-31 20:57:57 -06:00
JeffR 630285def6 Shifts handling of material and terrain material definitions to be written into the asset definition taml file instead of having an extra loose file
Also updates importers to correctly handle this change
Adds ability for taml XML serialization to properly assign array'd fields
Adds 'inheritFrom' field to simobjects for when objects with parent objects are serialized
AssetBase how inherits from SimGroup so it can have objects like material definitions embedded in them for save/load in the taml definition file
Updated loading/handling logic in terrain material asset to be more similar to regular material assets
2022-01-30 11:50:16 -06:00
Robert MacGregor 1b6b803a20 * BugFix: Clear a lot of warnings and correct a few actual programming errors along the way. 2021-10-04 20:04:21 -04:00
Jeff Hutchinson 35b33f1864 various fixes and memory corruption bug. 2021-09-09 19:30:32 -04:00
Jeff Hutchinson 27a4868b6e Fix buffer corruption. 2021-09-07 21:52:36 -04:00
Jeff Hutchinson 717c7acca9 Merge remote-tracking branch 'devhead/Preview4_0' into tsneo
# Conflicts:
#	Templates/BaseGame/game/data/ui/guis/loadingGui.gui
#	Templates/BaseGame/game/data/ui/guis/mainMenu.gui
#	Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui
#	Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui
#	Templates/BaseGame/game/tools/forestEditor/brushes.tscript
2021-08-13 20:14:39 -04:00
AzaezelX 313466f57c new method from JeffH and Marauder: getClassHierarchy(classname). dumps a list of the class inhericance in reverse ancestor order (so that class first, next parent, *it's* parent, ect 2021-07-22 11:55:34 -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
Jeff Hutchinson f776e73b04 cleanup 2021-04-02 00:57:49 -04:00
Jeff Hutchinson 02447f0996 compile fixes. 2021-03-31 22:12:58 -04:00
Jeff Hutchinson 50df52ecfc more console refactor. 2021-03-31 21:09:23 -04:00
Lukas Joergensen fe09d6e125 ModuleSystem: Lookup CInterface methods when calling module create func 2020-11-15 21:30:45 +01:00
Lukas Aldershaab c999baf7ed Moves from using dStrCmp to the new String::compare static functions. Keeps things cleaner, consistent, and works with intellisense. 2020-10-03 14:37:55 +02:00
Areloch 2c2c9659e1 Merge branch 'alpha40_HiddenHugs' of https://github.com/Azaezel/Torque3D into Preview4_0_w_alph40_cleanups 2020-05-16 02:17:24 -05:00
AzaezelX 2c1508c169 uninitialized variables-console 2020-05-11 14:40:31 -05:00
AzaezelX bf50af7954 show/hide children automagically for simgroups via inspector
operates by shifting oninspectpostapply callback further down the inheritance hieracrchy and add some scripts to trigger sethidden and setlocked for all sceneobjects in a given simgroup if the states are set for that group
2020-03-29 17:36:33 -05:00
Areloch 701ae6034d Update simObject.cpp
Accidental redefine
2019-02-23 21:41:22 -06:00
Areloch 173dbc8868 Update simObject.cpp
better way to handle the validity check for const char*
2019-02-23 20:14:10 -06:00
Areloch 728511b137 Sanity check so calling getFieldValue on a blank fieldName doesn't cause a crash. 2019-02-23 16:50:05 -06:00