Commit graph

70 commits

Author SHA1 Message Date
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
Areloch 6cf0c9e360 Merge branch 'development' into EngineAPI-Refactor 2018-12-09 14:48:50 -06:00
Lukas Joergensen 7d91d0a577 Eliminate ConsoleFunction and ConsoleMethod, replace with DefineEngineStringlyVariadic 2018-04-20 22:09:58 +02:00
Lukas Joergensen 76908eae3c Eliminate DefineConsoleMethod 2018-04-17 21:01:50 +02:00
Azaezel cbce2ee805 Merge branch 'development' of https://github.com/GarageGames/Torque3D into memberMess
# Conflicts:
#	Engine/source/console/consoleFunctions.cpp
2018-03-28 15:42:34 -05:00
Azaezel f36826605f simobject, dictionary, stringtable, and taml clarificationsand cleanups 2018-03-13 17:30:33 -05:00
Azaezel 2e7d406860 variable naming cleanup due to locals overriding in multiple places. objectname to mObjectName+ getName() refs in dictionary. 2018-03-12 02:36:52 -05:00
Glenn Smith 79c34c68db Use strncpy instead of strcpy because again, buffer overflows 2018-03-06 02:35:33 -05:00
Glenn Smith 7769da9434 Use strncat instead of strcat to prevent some buffer overflows 2018-03-06 00:48:44 -05:00
Areloch 402ce9b251 Adds a new function for defining static console fields on NetObjects - addNetworkedField()
This lets you attach a 32 bit netMask to the field, so that when it is changed, it automatically flags the associated bitmasks on the netobject as dirty.

This is to shortcut having to flag certain masks being marked as dirty through protected fields and just simplify/streamline the code.
2018-01-16 00:47:53 -06:00
Areloch d666322a1b Merging 2017-11-05 22:33:32 -06:00
Marc Chapman 8436dff732 enhanced-field-mgmt -- Enhancements to dynamic field handling that allow for name filtering and replacement limiting 2017-07-26 21:49:45 +01:00