Browse Source

Merge pull request #2245 from lukaspj/EngineAPI-Refactor

Clean-up uses of ConsoleFunction etc.
Areloch 6 years ago
parent
commit
25aa766234
100 changed files with 866 additions and 1009 deletions
  1. 13 13
      Engine/source/T3D/aiClient.cpp
  2. 8 8
      Engine/source/T3D/aiConnection.cpp
  3. 1 1
      Engine/source/T3D/aiPlayer.cpp
  4. 1 1
      Engine/source/T3D/assets/MaterialAsset.cpp
  5. 7 6
      Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h
  6. 7 7
      Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h
  7. 26 19
      Engine/source/T3D/components/component.cpp
  8. 22 29
      Engine/source/T3D/entity.cpp
  9. 24 30
      Engine/source/T3D/gameBase/gameConnection.cpp
  10. 1 1
      Engine/source/T3D/gameBase/gameProcess.cpp
  11. 2 2
      Engine/source/T3D/gameFunctions.cpp
  12. 2 2
      Engine/source/T3D/lightBase.cpp
  13. 1 1
      Engine/source/T3D/missionMarker.cpp
  14. 1 1
      Engine/source/T3D/physics/physicsDebris.cpp
  15. 13 13
      Engine/source/T3D/physics/physicsPlugin.cpp
  16. 9 11
      Engine/source/T3D/player.cpp
  17. 2 2
      Engine/source/T3D/staticShape.cpp
  18. 49 66
      Engine/source/afx/afxCamera.cpp
  19. 22 22
      Engine/source/afx/afxMagicSpell.cpp
  20. 24 60
      Engine/source/afx/arcaneFX.cpp
  21. 15 13
      Engine/source/app/game.cpp
  22. 3 3
      Engine/source/app/net/net.cpp
  23. 10 10
      Engine/source/app/net/serverQuery.cpp
  24. 7 7
      Engine/source/app/version.cpp
  25. 4 4
      Engine/source/assets/assetQuery_ScriptBinding.h
  26. 1 1
      Engine/source/cinterface/c_scripting.cpp
  27. 1 1
      Engine/source/cinterface/cinterface.cpp
  28. 2 2
      Engine/source/console/SimXMLDocument.cpp
  29. 3 3
      Engine/source/console/console.cpp
  30. 0 32
      Engine/source/console/console.h
  31. 2 2
      Engine/source/console/consoleDoc.cpp
  32. 107 110
      Engine/source/console/consoleFunctions.cpp
  33. 2 2
      Engine/source/console/consoleLogger.cpp
  34. 1 1
      Engine/source/console/consoleXMLExport.cpp
  35. 52 66
      Engine/source/console/engineAPI.h
  36. 4 4
      Engine/source/console/fieldBrushObject.cpp
  37. 13 13
      Engine/source/console/persistenceManager.cpp
  38. 14 16
      Engine/source/console/scriptFilename.cpp
  39. 13 13
      Engine/source/console/sim.cpp
  40. 3 3
      Engine/source/console/simDatablock.cpp
  41. 31 31
      Engine/source/console/simObject.cpp
  42. 1 1
      Engine/source/console/simPersistSet.cpp
  43. 7 23
      Engine/source/console/simSet.cpp
  44. 1 1
      Engine/source/console/telnetConsole.cpp
  45. 3 3
      Engine/source/console/telnetDebugger.cpp
  46. 23 36
      Engine/source/core/color.cpp
  47. 1 1
      Engine/source/core/dnet.cpp
  48. 1 1
      Engine/source/core/fileObject.cpp
  49. 2 2
      Engine/source/core/frameAllocator.cpp
  50. 5 6
      Engine/source/core/resourceManager.cpp
  51. 2 2
      Engine/source/core/stringBuffer.cpp
  52. 1 1
      Engine/source/core/util/str.cpp
  53. 1 1
      Engine/source/environment/VolumetricFogRTManager.cpp
  54. 15 15
      Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp
  55. 14 14
      Engine/source/environment/editors/guiRiverEditorCtrl.cpp
  56. 11 11
      Engine/source/environment/editors/guiRoadEditorCtrl.cpp
  57. 1 1
      Engine/source/environment/skyBox.cpp
  58. 2 2
      Engine/source/environment/sun.cpp
  59. 1 1
      Engine/source/forest/editor/forestBrushElement.cpp
  60. 1 1
      Engine/source/forest/editor/forestBrushTool.cpp
  61. 6 6
      Engine/source/forest/editor/forestEditorCtrl.cpp
  62. 6 6
      Engine/source/forest/editor/forestSelectionTool.cpp
  63. 4 4
      Engine/source/forest/forest.cpp
  64. 1 1
      Engine/source/gfx/gfxDevice.cpp
  65. 1 1
      Engine/source/gfx/gfxInit.cpp
  66. 1 1
      Engine/source/gfx/gl/gfxGLDevice.cpp
  67. 1 1
      Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp
  68. 3 3
      Engine/source/gfx/video/theoraTextureObject.cpp
  69. 3 3
      Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp
  70. 1 1
      Engine/source/gui/controls/guiBitmapCtrl.cpp
  71. 3 3
      Engine/source/gui/controls/guiColorPicker.cpp
  72. 3 3
      Engine/source/gui/controls/guiFileTreeCtrl.cpp
  73. 2 2
      Engine/source/gui/controls/guiGradientCtrl.cpp
  74. 1 1
      Engine/source/gui/controls/guiMaterialCtrl.cpp
  75. 19 19
      Engine/source/gui/controls/guiPopUpCtrl.cpp
  76. 9 9
      Engine/source/gui/controls/guiPopUpCtrlEx.cpp
  77. 23 24
      Engine/source/gui/core/guiCanvas.cpp
  78. 1 1
      Engine/source/gui/core/guiControl.cpp
  79. 8 8
      Engine/source/gui/editor/guiDebugger.cpp
  80. 28 28
      Engine/source/gui/editor/guiEditCtrl.cpp
  81. 3 3
      Engine/source/gui/editor/guiFilterCtrl.cpp
  82. 1 1
      Engine/source/gui/editor/guiGraphCtrl.cpp
  83. 6 7
      Engine/source/gui/editor/guiInspectorTypes.cpp
  84. 6 6
      Engine/source/gui/editor/guiMenuBar.cpp
  85. 30 30
      Engine/source/gui/editor/guiParticleGraphCtrl.cpp
  86. 5 4
      Engine/source/gui/editor/inspector/componentGroup.cpp
  87. 1 1
      Engine/source/gui/editor/inspector/dynamicField.cpp
  88. 3 3
      Engine/source/gui/editor/inspector/dynamicGroup.cpp
  89. 5 3
      Engine/source/gui/editor/inspector/entityGroup.cpp
  90. 9 9
      Engine/source/gui/editor/inspector/field.cpp
  91. 5 3
      Engine/source/gui/editor/inspector/mountingGroup.cpp
  92. 2 2
      Engine/source/gui/editor/inspector/variableGroup.cpp
  93. 8 8
      Engine/source/gui/editor/inspector/variableInspector.cpp
  94. 10 10
      Engine/source/gui/editor/popupMenu.cpp
  95. 2 2
      Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp
  96. 1 1
      Engine/source/gui/shiny/guiTickCtrl.cpp
  97. 1 1
      Engine/source/gui/utility/messageVector.cpp
  98. 9 9
      Engine/source/gui/worldEditor/creator.cpp
  99. 5 5
      Engine/source/gui/worldEditor/editor.cpp
  100. 14 21
      Engine/source/gui/worldEditor/editorIconRegistry.cpp

+ 13 - 13
Engine/source/T3D/aiClient.cpp

@@ -418,7 +418,7 @@ void AIClient::onAdd( const char *nameSpace ) {
 /**
  * Sets the move speed for an AI object
  */
-DefineConsoleMethod( AIClient, setMoveSpeed, void, (F32 speed), , "ai.setMoveSpeed( float );" ) 
+DefineEngineMethod( AIClient, setMoveSpeed, void, (F32 speed), , "ai.setMoveSpeed( float );" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    ai->setMoveSpeed( speed );
@@ -427,7 +427,7 @@ DefineConsoleMethod( AIClient, setMoveSpeed, void, (F32 speed), , "ai.setMoveSpe
 /**
  * Stops all AI movement, halt!
  */
-DefineConsoleMethod( AIClient, stop, void, (),, "ai.stop();" ) 
+DefineEngineMethod( AIClient, stop, void, (),, "ai.stop();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    ai->setMoveMode( AIClient::ModeStop );
@@ -436,7 +436,7 @@ DefineConsoleMethod( AIClient, stop, void, (),, "ai.stop();" )
 /**
  * Tells the AI to aim at the location provided
  */
-DefineConsoleMethod( AIClient, setAimLocation, void, (Point3F v), , "ai.setAimLocation( x y z );" ) 
+DefineEngineMethod( AIClient, setAimLocation, void, (Point3F v), , "ai.setAimLocation( x y z );" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
 
@@ -446,7 +446,7 @@ DefineConsoleMethod( AIClient, setAimLocation, void, (Point3F v), , "ai.setAimLo
 /**
  * Tells the AI to move to the location provided
  */
-DefineConsoleMethod( AIClient, setMoveDestination, void, (Point3F v), , "ai.setMoveDestination( x y z );" )
+DefineEngineMethod( AIClient, setMoveDestination, void, (Point3F v), , "ai.setMoveDestination( x y z );" )
 {
    AIClient *ai = static_cast<AIClient *>( object );
 
@@ -456,7 +456,7 @@ DefineConsoleMethod( AIClient, setMoveDestination, void, (Point3F v), , "ai.setM
 /**
  * Returns the point the AI is aiming at
  */
-DefineConsoleMethod( AIClient, getAimLocation, Point3F, (),, "ai.getAimLocation();" ) 
+DefineEngineMethod( AIClient, getAimLocation, Point3F, (),, "ai.getAimLocation();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    return ai->getAimLocation();
@@ -465,7 +465,7 @@ DefineConsoleMethod( AIClient, getAimLocation, Point3F, (),, "ai.getAimLocation(
 /**
  * Returns the point the AI is set to move to
  */
-DefineConsoleMethod( AIClient, getMoveDestination, Point3F, (),, "ai.getMoveDestination();" ) 
+DefineEngineMethod( AIClient, getMoveDestination, Point3F, (),, "ai.getMoveDestination();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    return ai->getMoveDestination();
@@ -474,7 +474,7 @@ DefineConsoleMethod( AIClient, getMoveDestination, Point3F, (),, "ai.getMoveDest
 /**
  * Sets the bots target object
  */
-DefineConsoleMethod( AIClient, setTargetObject, void, (const char * objName), , "ai.setTargetObject( obj );" ) 
+DefineEngineMethod( AIClient, setTargetObject, void, (const char * objName), , "ai.setTargetObject( obj );" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    
@@ -489,7 +489,7 @@ DefineConsoleMethod( AIClient, setTargetObject, void, (const char * objName), ,
 /**
  * Gets the object the AI is targeting
  */
-DefineConsoleMethod( AIClient, getTargetObject, S32, (),, "ai.getTargetObject();" ) 
+DefineEngineMethod( AIClient, getTargetObject, S32, (),, "ai.getTargetObject();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
 
@@ -499,7 +499,7 @@ DefineConsoleMethod( AIClient, getTargetObject, S32, (),, "ai.getTargetObject();
 /**
  * Tells the bot the mission is cycling
  */
-DefineConsoleMethod( AIClient, missionCycleCleanup, void, (),, "ai.missionCycleCleanup();" ) 
+DefineEngineMethod( AIClient, missionCycleCleanup, void, (),, "ai.missionCycleCleanup();" ) 
 {
    AIClient *ai = static_cast<AIClient*>( object );
    ai->missionCycleCleanup();
@@ -508,7 +508,7 @@ DefineConsoleMethod( AIClient, missionCycleCleanup, void, (),, "ai.missionCycleC
 /**
  * Sets the AI to run mode
  */
-DefineConsoleMethod( AIClient, move, void, (),, "ai.move();" ) 
+DefineEngineMethod( AIClient, move, void, (),, "ai.move();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    ai->setMoveMode( AIClient::ModeMove );
@@ -517,7 +517,7 @@ DefineConsoleMethod( AIClient, move, void, (),, "ai.move();" )
 /**
  * Gets the AI's location in the world
  */
-DefineConsoleMethod( AIClient, getLocation, Point3F, (),, "ai.getLocation();" ) 
+DefineEngineMethod( AIClient, getLocation, Point3F, (),, "ai.getLocation();" ) 
 {
    AIClient *ai = static_cast<AIClient *>( object );
    return ai->getLocation();
@@ -526,7 +526,7 @@ DefineConsoleMethod( AIClient, getLocation, Point3F, (),, "ai.getLocation();" )
 /**
  * Adds an AI Player to the game
  */
-DefineConsoleFunction( aiAddPlayer, S32, (const char * name, const char * ns), (""), "'playerName'[, 'AIClassType'] );")
+DefineEngineFunction( aiAddPlayer, S32, (const char * name, const char * ns), (""), "'playerName'[, 'AIClassType'] );")
 {
    // Create the player
    AIClient *aiPlayer = new AIClient();
@@ -559,7 +559,7 @@ DefineConsoleFunction( aiAddPlayer, S32, (const char * name, const char * ns), (
 /**
  * Tells the AI to move forward 100 units...TEST FXN
  */
-DefineConsoleMethod( AIClient, moveForward, void, (),, "ai.moveForward();" ) 
+DefineEngineMethod( AIClient, moveForward, void, (),, "ai.moveForward();" ) 
 {
    
    AIClient *ai = static_cast<AIClient *>( object );

+ 8 - 8
Engine/source/T3D/aiConnection.cpp

@@ -130,7 +130,7 @@ static inline F32 moveClamp(F32 v)
 
 //-----------------------------------------------------------------------------
 /// Construct and connect an AI connection object
-ConsoleFunction(aiConnect, S32 , 2, 20, "(...)"
+DefineEngineStringlyVariadicFunction(aiConnect, S32 , 2, 20, "(...)"
    "@brief Creates a new AIConnection, and passes arguments to its onConnect script callback.\n\n"
    "@returns The newly created AIConnection\n"
    "@see GameConnection for parameter information\n"
@@ -160,7 +160,7 @@ ConsoleFunction(aiConnect, S32 , 2, 20, "(...)"
 
 
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(AIConnection, setMove, void, (const char * field, F32 value), ,"(string field, float value)"
+DefineEngineMethod(AIConnection, setMove, void, (const char * field, F32 value), ,"(string field, float value)"
               "Set a field on the current move.\n\n"
               "@param   field One of {'x','y','z','yaw','pitch','roll'}\n"
               "@param   value Value to set field to.")
@@ -190,7 +190,7 @@ DefineConsoleMethod(AIConnection, setMove, void, (const char * field, F32 value)
    object->setMove(&move);
 }
 
-DefineConsoleMethod(AIConnection,getMove,F32, (const char * field), ,"(string field)"
+DefineEngineMethod(AIConnection,getMove,F32, (const char * field), ,"(string field)"
               "Get the given field of a move.\n\n"
               "@param field One of {'x','y','z','yaw','pitch','roll'}\n"
               "@returns The requested field on the current move.")
@@ -212,7 +212,7 @@ DefineConsoleMethod(AIConnection,getMove,F32, (const char * field), ,"(string fi
 }
 
 
-DefineConsoleMethod(AIConnection,setFreeLook,void,(bool isFreeLook), ,"(bool isFreeLook)"
+DefineEngineMethod(AIConnection,setFreeLook,void,(bool isFreeLook), ,"(bool isFreeLook)"
               "Enable/disable freelook on the current move.")
 {
    Move move = object->getMove();
@@ -220,7 +220,7 @@ DefineConsoleMethod(AIConnection,setFreeLook,void,(bool isFreeLook), ,"(bool isF
    object->setMove(&move);
 }
 
-DefineConsoleMethod(AIConnection, getFreeLook, bool, (), ,"getFreeLook()"
+DefineEngineMethod(AIConnection, getFreeLook, bool, (), ,"getFreeLook()"
               "Is freelook on for the current move?")
 {
    return object->getMove().freeLook;
@@ -229,7 +229,7 @@ DefineConsoleMethod(AIConnection, getFreeLook, bool, (), ,"getFreeLook()"
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(AIConnection,setTrigger,void, (S32 idx, bool set), ,"(int trigger, bool set)"
+DefineEngineMethod(AIConnection,setTrigger,void, (S32 idx, bool set), ,"(int trigger, bool set)"
               "Set a trigger.")
 {
    if (idx >= 0 && idx < MaxTriggerKeys)  
@@ -240,7 +240,7 @@ DefineConsoleMethod(AIConnection,setTrigger,void, (S32 idx, bool set), ,"(int tr
    }
 }
 
-DefineConsoleMethod(AIConnection,getTrigger,bool, (S32 idx), ,"(int trigger)"
+DefineEngineMethod(AIConnection,getTrigger,bool, (S32 idx), ,"(int trigger)"
               "Is the given trigger set?")
 {
    if (idx >= 0 && idx < MaxTriggerKeys)
@@ -251,7 +251,7 @@ DefineConsoleMethod(AIConnection,getTrigger,bool, (S32 idx), ,"(int trigger)"
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(AIConnection,getAddress,const char*,(), ,"")
+DefineEngineMethod(AIConnection,getAddress,const char*,(), ,"")
 {
    // Override the netConnection method to return to indicate
    // this is an ai connection.

+ 1 - 1
Engine/source/T3D/aiPlayer.cpp

@@ -1251,7 +1251,7 @@ ConsoleDocFragment _setAimObject(
    "void setAimObject(GameBase targetObject, Point3F offset);"
 );
 
-DefineConsoleMethod( AIPlayer, setAimObject, void, ( const char * objName, Point3F offset ), (Point3F::Zero), "( GameBase obj, [Point3F offset] )"
+DefineEngineMethod( AIPlayer, setAimObject, void, ( const char * objName, Point3F offset ), (Point3F::Zero), "( GameBase obj, [Point3F offset] )"
               "Sets the bot's target object. Optionally set an offset from target location."
            "@hide")
 {

+ 1 - 1
Engine/source/T3D/assets/MaterialAsset.cpp

@@ -157,7 +157,7 @@ void MaterialAsset::copyTo(SimObject* object)
    Parent::copyTo(object);
 }
 
-ConsoleMethod(MaterialAsset, compileShader, void, 2, 2, "() - Compiles the material's generated shader, if any. Not yet implemented\n")
+DefineEngineMethod(MaterialAsset, compileShader, void, (), , "Compiles the material's generated shader, if any. Not yet implemented\n")
 {
    object->compileShader();
 }

+ 7 - 6
Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h

@@ -24,13 +24,14 @@
 #include "T3D/components/camera/cameraComponent.h"
 
 //Basically, this only exists for backwards compatibility for parts of the editors
-ConsoleMethod(CameraComponent, getMode, const char*, 2, 2, "() - We get the first behavior of the requested type on our owner object.\n"
+DefineEngineMethod(CameraComponent, getMode, const char*, (),, 
+   "@brief We get the first behavior of the requested type on our owner object.\n"
    "@return (string name) The type of the behavior we're requesting")
 {
    return "fly";
 }
 
-DefineConsoleMethod(CameraComponent, getForwardVector, VectorF, (), ,
+DefineEngineMethod(CameraComponent, getForwardVector, VectorF, (), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -44,7 +45,7 @@ DefineConsoleMethod(CameraComponent, getForwardVector, VectorF, (), ,
    return returnVec;
 }
 
-DefineConsoleMethod(CameraComponent, getRightVector, VectorF, (), ,
+DefineEngineMethod(CameraComponent, getRightVector, VectorF, (), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -58,7 +59,7 @@ DefineConsoleMethod(CameraComponent, getRightVector, VectorF, (), ,
    return returnVec;
 }
 
-DefineConsoleMethod(CameraComponent, getUpVector, VectorF, (), ,
+DefineEngineMethod(CameraComponent, getUpVector, VectorF, (), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -72,14 +73,14 @@ DefineConsoleMethod(CameraComponent, getUpVector, VectorF, (), ,
    return returnVec;
 }
 
-DefineConsoleMethod(CameraComponent, setForwardVector, void, (VectorF newForward), (VectorF(0, 0, 0)),
+DefineEngineMethod(CameraComponent, setForwardVector, void, (VectorF newForward), (VectorF(0, 0, 0)),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
    object->setForwardVector(newForward);
 }
 
-DefineConsoleMethod(CameraComponent, getWorldPosition, Point3F, (), ,
+DefineEngineMethod(CameraComponent, getWorldPosition, Point3F, (), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {

+ 7 - 7
Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h

@@ -24,21 +24,21 @@
 #include "T3D/components/collision/collisionComponent.h"
 #include "materials/baseMatInstance.h"
 
-DefineConsoleMethod(CollisionComponent, getNumberOfContacts, S32, (), ,
+DefineEngineMethod(CollisionComponent, getNumberOfContacts, S32, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
    return object->getCollisionList()->getCount();
 }
 
-DefineConsoleMethod(CollisionComponent, getBestContact, S32, (), ,
+DefineEngineMethod(CollisionComponent, getBestContact, S32, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
    return 0;
 }
 
-DefineConsoleMethod(CollisionComponent, getContactNormal, Point3F, (), ,
+DefineEngineMethod(CollisionComponent, getContactNormal, Point3F, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -53,7 +53,7 @@ DefineConsoleMethod(CollisionComponent, getContactNormal, Point3F, (), ,
    return Point3F::Zero;
 }
 
-DefineConsoleMethod(CollisionComponent, getContactMaterial, S32, (), ,
+DefineEngineMethod(CollisionComponent, getContactMaterial, S32, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -69,7 +69,7 @@ DefineConsoleMethod(CollisionComponent, getContactMaterial, S32, (), ,
    return 0;
 }
 
-DefineConsoleMethod(CollisionComponent, getContactObject, S32, (), ,
+DefineEngineMethod(CollisionComponent, getContactObject, S32, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -81,7 +81,7 @@ DefineConsoleMethod(CollisionComponent, getContactObject, S32, (), ,
    return 0;
 }
 
-DefineConsoleMethod(CollisionComponent, getContactPoint, Point3F, (), ,
+DefineEngineMethod(CollisionComponent, getContactPoint, Point3F, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -96,7 +96,7 @@ DefineConsoleMethod(CollisionComponent, getContactPoint, Point3F, (), ,
    return Point3F::Zero;
 }
 
-DefineConsoleMethod(CollisionComponent, getContactTime, S32, (), ,
+DefineEngineMethod(CollisionComponent, getContactTime, S32, (), ,
    "Gets the number of contacts this collider has hit.\n"
    "@return The number of static fields defined on the object.")
 {

+ 26 - 19
Engine/source/T3D/components/component.cpp

@@ -605,8 +605,8 @@ void Component::addDependency(StringTableEntry name)
 //////////////////////////////////////////////////////////////////////////
 // Console Methods
 //////////////////////////////////////////////////////////////////////////
-ConsoleMethod(Component, beginGroup, void, 3, 3, "(groupName)\n"
-   "Starts the grouping for following fields being added to be grouped into\n"
+DefineEngineMethod(Component, beginGroup, void, (String groupName),,
+   "@brief Starts the grouping for following fields being added to be grouped into\n"
    "@param groupName The name of this group\n"
    "@param desc The Description of this field\n"
    "@param type The DataType for this field (default, int, float, Point2F, bool, enum, Object, keybind, color)\n"
@@ -616,11 +616,11 @@ ConsoleMethod(Component, beginGroup, void, 3, 3, "(groupName)\n"
    "-object: the T2D object type that are valid choices for the field.  The object types observe inheritance, so if you have a t2dSceneObject field you will be able to choose t2dStaticSrpites, t2dAnimatedSprites, etc.\n"
    "@return Nothing\n")
 {
-   object->beginFieldGroup(argv[2]);
+   object->beginFieldGroup(groupName);
 }
 
-ConsoleMethod(Component, endGroup, void, 2, 2, "()\n"
-   "Ends the grouping for prior fields being added to be grouped into\n"
+DefineEngineMethod(Component, endGroup, void, (),,
+   "@brief Ends the grouping for prior fields being added to be grouped into\n"
    "@param groupName The name of this group\n"
    "@param desc The Description of this field\n"
    "@param type The DataType for this field (default, int, float, Point2F, bool, enum, Object, keybind, color)\n"
@@ -633,7 +633,7 @@ ConsoleMethod(Component, endGroup, void, 2, 2, "()\n"
    object->endFieldGroup();
 }
 
-DefineConsoleMethod(Component, addComponentField, void, (String fieldName, String fieldDesc, String fieldType, String defValue, String userData, bool hidden),
+DefineEngineMethod(Component, addComponentField, void, (String fieldName, String fieldDesc, String fieldType, String defValue, String userData, bool hidden),
    ("", "", "", "", "", false),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
@@ -641,7 +641,8 @@ DefineConsoleMethod(Component, addComponentField, void, (String fieldName, Strin
    object->addComponentField(fieldName, fieldDesc, fieldType, defValue, userData, hidden);
 }
 
-ConsoleMethod(Component, getComponentFieldCount, S32, 2, 2, "() - Get the number of ComponentField's on this object\n"
+DefineEngineMethod(Component, getComponentFieldCount, S32, (),, 
+   "@brief Get the number of ComponentField's on this object\n"
    "@return Returns the number of BehaviorFields as a nonnegative integer\n")
 {
    return object->getComponentFieldCount();
@@ -650,11 +651,12 @@ ConsoleMethod(Component, getComponentFieldCount, S32, 2, 2, "() - Get the number
 // [tom, 1/12/2007] Field accessors split into multiple methods to allow space
 // for long descriptions and type data.
 
-ConsoleMethod(Component, getComponentField, const char *, 3, 3, "(int index) - Gets a Tab-Delimited list of information about a ComponentField specified by Index\n"
+DefineEngineMethod(Component, getComponentField, const char *, (S32 index),, 
+   "@brief Gets a Tab-Delimited list of information about a ComponentField specified by Index\n"
    "@param index The index of the behavior\n"
    "@return FieldName, FieldType and FieldDefaultValue, each separated by a TAB character.\n")
 {
-   ComponentField *field = object->getComponentField(dAtoi(argv[2]));
+   ComponentField *field = object->getComponentField(index);
    if (field == NULL)
       return "";
 
@@ -664,11 +666,12 @@ ConsoleMethod(Component, getComponentField, const char *, 3, 3, "(int index) - G
    return buf;
 }
 
-ConsoleMethod(Component, setComponentield, const char *, 3, 3, "(int index) - Gets a Tab-Delimited list of information about a ComponentField specified by Index\n"
+DefineEngineMethod(Component, setComponentield, const char *, (S32 index),, 
+   "@brief Gets a Tab-Delimited list of information about a ComponentField specified by Index\n"
    "@param index The index of the behavior\n"
    "@return FieldName, FieldType and FieldDefaultValue, each separated by a TAB character.\n")
 {
-   ComponentField *field = object->getComponentField(dAtoi(argv[2]));
+   ComponentField *field = object->getComponentField(index);
    if (field == NULL)
       return "";
 
@@ -678,7 +681,7 @@ ConsoleMethod(Component, setComponentield, const char *, 3, 3, "(int index) - Ge
    return buf;
 }
 
-DefineConsoleMethod(Component, getComponentFieldType, const char *, (String fieldName), ,
+DefineEngineMethod(Component, getComponentFieldType, const char *, (String fieldName), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -689,36 +692,40 @@ DefineConsoleMethod(Component, getComponentFieldType, const char *, (String fiel
    return field->mFieldTypeName;;
 }
 
-ConsoleMethod(Component, getBehaviorFieldUserData, const char *, 3, 3, "(int index) - Gets the UserData associated with a field by index in the field list\n"
+DefineEngineMethod(Component, getBehaviorFieldUserData, const char *, (S32 index),, 
+   "@brief Gets the UserData associated with a field by index in the field list\n"
    "@param index The index of the behavior\n"
    "@return Returns a string representing the user data of this field\n")
 {
-   ComponentField *field = object->getComponentField(dAtoi(argv[2]));
+   ComponentField *field = object->getComponentField(index);
    if (field == NULL)
       return "";
 
    return field->mUserData;
 }
 
-ConsoleMethod(Component, getComponentFieldDescription, const char *, 3, 3, "(int index) - Gets a field description by index\n"
+DefineEngineMethod(Component, getComponentFieldDescription, const char *, (S32 index),, 
+   "@brief Gets a field description by index\n"
    "@param index The index of the behavior\n"
    "@return Returns a string representing the description of this field\n")
 {
-   ComponentField *field = object->getComponentField(dAtoi(argv[2]));
+   ComponentField *field = object->getComponentField(index);
    if (field == NULL)
       return "";
 
    return field->mFieldDescription ? field->mFieldDescription : "";
 }
 
-ConsoleMethod(Component, addDependency, void, 3, 3, "(string behaviorName) - Gets a field description by index\n"
+DefineEngineMethod(Component, addDependency, void, (String behaviorName),, 
+   "@brief Gets a field description by index\n"
    "@param index The index of the behavior\n"
    "@return Returns a string representing the description of this field\n")
 {
-   object->addDependency(argv[2]);
+   object->addDependency(behaviorName);
 }
 
-ConsoleMethod(Component, setDirty, void, 2, 2, "() - Gets a field description by index\n"
+DefineEngineMethod(Component, setDirty, void, (),,
+   "@brief Gets a field description by index\n"
    "@param index The index of the behavior\n"
    "@return Returns a string representing the description of this field\n")
 {

+ 22 - 29
Engine/source/T3D/entity.cpp

@@ -1798,7 +1798,7 @@ DefineEngineMethod(Entity, setBox, void,
 }
 
 
-/*DefineConsoleMethod(Entity, callOnComponents, void, (const char* functionName), ,
+/*DefineEngineMethod(Entity, callOnComponents, void, (const char* functionName), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -1821,12 +1821,11 @@ ConsoleMethod(Entity, addComponents, void, 2, 2, "() - Add all fielded behaviors
    object->addComponents();
 }*/
 
-ConsoleMethod(Entity, addComponent, bool, 3, 3, "(ComponentInstance bi) - Add a behavior to the object\n"
+DefineEngineMethod(Entity, addComponent, bool, (Component* comp),,
+   "@brief Add a behavior to the object\n"
    "@param bi The behavior instance to add"
    "@return (bool success) Whether or not the behavior was successfully added")
 {
-   Component *comp = dynamic_cast<Component *>(Sim::findObject(argv[2]));
-
    if (comp != NULL)
    {
       bool success = object->addComponent(comp);
@@ -1846,40 +1845,33 @@ ConsoleMethod(Entity, addComponent, bool, 3, 3, "(ComponentInstance bi) - Add a
    return false;
 }
 
-ConsoleMethod(Entity, removeComponent, bool, 3, 4, "(ComponentInstance bi, [bool deleteBehavior = true])\n"
+DefineEngineMethod(Entity, removeComponent, bool, (Component* comp, bool deleteComponent), (true),
    "@param bi The behavior instance to remove\n"
    "@param deleteBehavior Whether or not to delete the behavior\n"
    "@return (bool success) Whether the behavior was successfully removed")
 {
-   bool deleteComponent = true;
-   if (argc > 3)
-      deleteComponent = dAtob(argv[3]);
-
-   return object->removeComponent(dynamic_cast<Component *>(Sim::findObject(argv[2])), deleteComponent);
+   return object->removeComponent(comp, deleteComponent);
 }
 
-ConsoleMethod(Entity, clearComponents, void, 2, 2, "() - Clear all behavior instances\n"
+DefineEngineMethod(Entity, clearComponents, void, (),, "Clear all behavior instances\n"
    "@return No return value")
 {
    object->clearComponents();
 }
 
-ConsoleMethod(Entity, getComponentByIndex, S32, 3, 3, "(int index) - Gets a particular behavior\n"
+DefineEngineMethod(Entity, getComponentByIndex, Component*, (S32 index),, 
+   "@brief Gets a particular behavior\n"
    "@param index The index of the behavior to get\n"
    "@return (ComponentInstance bi) The behavior instance you requested")
 {
-   Component *comp = object->getComponent(dAtoi(argv[2]));
-
-   return (comp != NULL) ? comp->getId() : 0;
+   return object->getComponent(index);
 }
 
-DefineConsoleMethod(Entity, getComponent, S32, (String componentName), (""),
+DefineEngineMethod(Entity, getComponent, Component*, (String componentName), (""),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
-   Component *comp = object->getComponent(componentName);
-
-   return (comp != NULL) ? comp->getId() : 0;
+   return object->getComponent(componentName);
 }
 
 /*ConsoleMethod(Entity, getBehaviorByType, S32, 3, 3, "(string BehaviorTemplateName) - gets a behavior\n"
@@ -1908,13 +1900,14 @@ DefineConsoleMethod(Entity, getComponent, S32, (String componentName), (""),
    return object->reOrder(inst, idx);
 }*/
 
-ConsoleMethod(Entity, getComponentCount, S32, 2, 2, "() - Get the count of behaviors on an object\n"
+DefineEngineMethod(Entity, getComponentCount, S32, (),, 
+   "@brief Get the count of behaviors on an object\n"
    "@return (int count) The number of behaviors on an object")
 {
    return object->getComponentCount();
 }
 
-DefineConsoleMethod(Entity, setComponentDirty, void, (S32 componentID, bool forceUpdate), (0, false),
+DefineEngineMethod(Entity, setComponentDirty, void, (S32 componentID, bool forceUpdate), (0, false),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -1923,7 +1916,7 @@ DefineConsoleMethod(Entity, setComponentDirty, void, (S32 componentID, bool forc
       object->setComponentDirty(comp, forceUpdate);*/
 }
 
-DefineConsoleMethod(Entity, getMoveVector, VectorF, (),,
+DefineEngineMethod(Entity, getMoveVector, VectorF, (),,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -1937,7 +1930,7 @@ DefineConsoleMethod(Entity, getMoveVector, VectorF, (),,
    return VectorF::Zero;
 }
 
-DefineConsoleMethod(Entity, getMoveRotation, VectorF, (), ,
+DefineEngineMethod(Entity, getMoveRotation, VectorF, (), ,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -1951,7 +1944,7 @@ DefineConsoleMethod(Entity, getMoveRotation, VectorF, (), ,
    return VectorF::Zero;
 }
 
-DefineConsoleMethod(Entity, getMoveTrigger, bool, (S32 triggerNum), (0),
+DefineEngineMethod(Entity, getMoveTrigger, bool, (S32 triggerNum), (0),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
@@ -1972,28 +1965,28 @@ DefineEngineMethod(Entity, getForwardVector, VectorF, (), ,
    return forVec;
 }
 
-DefineConsoleMethod(Entity, setForwardVector, void, (VectorF newForward), (VectorF(0,0,0)),
+DefineEngineMethod(Entity, setForwardVector, void, (VectorF newForward), (VectorF(0,0,0)),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
    object->setForwardVector(newForward);
 }
 
-DefineConsoleMethod(Entity, lookAt, void, (Point3F lookPosition),,
+DefineEngineMethod(Entity, lookAt, void, (Point3F lookPosition),,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
    //object->setForwardVector(newForward);
 }
 
-DefineConsoleMethod(Entity, rotateTo, void, (Point3F lookPosition, F32 degreePerSecond), (1.0),
+DefineEngineMethod(Entity, rotateTo, void, (Point3F lookPosition, F32 degreePerSecond), (1.0),
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object.")
 {
    //object->setForwardVector(newForward);
 }
 
-DefineConsoleMethod(Entity, notify, void, (String signalFunction, String argA, String argB, String argC, String argD, String argE),
+DefineEngineMethod(Entity, notify, void, (String signalFunction, String argA, String argB, String argC, String argD, String argE),
 ("", "", "", "", "", ""),
 "Triggers a signal call to all components for a certain function.")
 {
@@ -2003,7 +1996,7 @@ DefineConsoleMethod(Entity, notify, void, (String signalFunction, String argA, S
    object->notifyComponents(signalFunction, argA, argB, argC, argD, argE);
 }
 
-DefineConsoleFunction(findEntitiesByTag, const char*, (SimGroup* searchingGroup, String tags), (nullAsType<SimGroup*>(), ""),
+DefineEngineFunction(findEntitiesByTag, const char*, (SimGroup* searchingGroup, String tags), (nullAsType<SimGroup*>(), ""),
 "Finds all entities that have the provided tags.\n"
 "@param searchingGroup The SimGroup to search inside. If null, we'll search the entire dictionary(this can be slow!).\n"
 "@param tags Word delimited list of tags to search for. If multiple tags are included, the list is eclusively parsed, requiring all tags provided to be found on an entity for a match.\n"

+ 24 - 30
Engine/source/T3D/gameBase/gameConnection.cpp

@@ -326,7 +326,7 @@ DefineEngineMethod( GameConnection, setJoinPassword, void, (const char* password
    object->setJoinPassword(password);
 }
 
-ConsoleMethod(GameConnection, setConnectArgs, void, 3, 17,
+DefineEngineStringlyVariadicMethod(GameConnection, setConnectArgs, void, 3, 17,
    "(const char* args) @brief On the client, pass along a variable set of parameters to the server.\n\n"
    
    "Once the connection is established with the server, the server calls its onConnect() method "
@@ -2451,41 +2451,37 @@ DefineEngineMethod( GameConnection, getVisibleGhostDistance, F32, (),,
 // Object Selection in Torque by Dave Myers 
 //   http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7335
 
-ConsoleMethod(GameConnection, setSelectedObj, bool, 3, 4, "(object, [propagate_to_client])")
+DefineEngineMethod(GameConnection, setSelectedObj, bool, (SceneObject* obj, bool propagate_to_client), (false), "")
 {
-   SceneObject* pending_selection;
-   if (!Sim::findObject(argv[2], pending_selection))
+   if (!obj)
       return false;
 
-   bool propagate_to_client = (argc > 3) ? dAtob(argv[3]) : false;
-   object->setSelectedObj(pending_selection, propagate_to_client);
+   object->setSelectedObj(obj, propagate_to_client);
 
    return true;
 }
 
-ConsoleMethod(GameConnection, getSelectedObj, S32, 2, 2, "()")
+DefineEngineMethod(GameConnection, getSelectedObj, SimObject*, (),, "")
 {
-   SimObject* selected = object->getSelectedObj();
-   return (selected) ? selected->getId(): -1;
+   return object->getSelectedObj();
 }
 
-ConsoleMethod(GameConnection, clearSelectedObj, void, 2, 3, "([propagate_to_client])")
+DefineEngineMethod(GameConnection, clearSelectedObj, void, (bool propagate_to_client), (false), "")
 {
-   bool propagate_to_client = (argc > 2) ? dAtob(argv[2]) : false;
    object->setSelectedObj(NULL, propagate_to_client);
 }
 
-ConsoleMethod(GameConnection, setPreSelectedObjFromRollover, void, 2, 2, "()")
+DefineEngineMethod(GameConnection, setPreSelectedObjFromRollover, void, (),, "")
 {
    object->setPreSelectedObjFromRollover();
 }
 
-ConsoleMethod(GameConnection, clearPreSelectedObj, void, 2, 2, "()")
+DefineEngineMethod(GameConnection, clearPreSelectedObj, void, (),, "")
 {
    object->clearPreSelectedObj();
 }
 
-ConsoleMethod(GameConnection, setSelectedObjFromPreSelected, void, 2, 2, "()")
+DefineEngineMethod(GameConnection, setSelectedObjFromPreSelected, void, (),, "")
 {
    object->setSelectedObjFromPreSelected();
 }
@@ -2722,33 +2718,32 @@ void GameConnection::resetDatablockCache()
    afx_saved_db_cache_CRC = 0xffffffff;
 }
 
-ConsoleFunction(resetDatablockCache, void, 1, 1, "resetDatablockCache()")
+DefineEngineFunction(resetDatablockCache, void, (),,"")
 {
    GameConnection::resetDatablockCache();
 }
 
-ConsoleFunction(isDatablockCacheSaved, bool, 1, 1, "resetDatablockCache()")
+DefineEngineFunction(isDatablockCacheSaved, bool, (),,"")
 {
    return afx_saved_db_cache;
 }
 
-ConsoleFunction(getDatablockCacheCRC, S32, 1, 1, "getDatablockCacheCRC()")
+DefineEngineFunction(getDatablockCacheCRC, S32, (),,"")
 {
    return (S32)afx_saved_db_cache_CRC;
 }
 
-ConsoleFunction(extractDatablockCacheCRC, S32, 2, 2, "extractDatablockCacheCRC(filename)")
+DefineEngineFunction(extractDatablockCacheCRC, S32, (const char* fileName),,"")
 {
    FileStream f_stream;
-   const char* fileName = argv[1];
-   if(!f_stream.open(fileName, Torque::FS::File::Read))
+   if (!f_stream.open(fileName, Torque::FS::File::Read))
    {
       Con::errorf("Failed to open file '%s'.", fileName);
       return -1;
    }
 
    U32 stream_sz = f_stream.getStreamSize();
-   if (stream_sz < 4*32)
+   if (stream_sz < 4 * 32)
    {
       Con::errorf("File '%s' is not a valid datablock cache.", fileName);
       f_stream.close();
@@ -2777,17 +2772,16 @@ ConsoleFunction(extractDatablockCacheCRC, S32, 2, 2, "extractDatablockCacheCRC(f
    return (S32)crc_code;
 }
 
-ConsoleFunction(setDatablockCacheCRC, void, 2, 2, "setDatablockCacheCRC(crc)")
+DefineEngineFunction(setDatablockCacheCRC, void, (U32 crc), , "")
 {
    GameConnection *conn = GameConnection::getConnectionToServer();
-   if(!conn)
+   if (!conn)
       return;
 
-   U32 crc_u = (U32)dAtoi(argv[1]);
-   conn->setServerCacheCRC(crc_u);
+   conn->setServerCacheCRC(crc);
 }
 
-ConsoleMethod( GameConnection, saveDatablockCache, void, 2, 2, "saveDatablockCache()")
+DefineEngineMethod(GameConnection, saveDatablockCache, void, (),, "")
 {
    if (GameConnection::serverCacheEnabled() && !afx_saved_db_cache)
    {
@@ -2802,14 +2796,14 @@ ConsoleMethod( GameConnection, saveDatablockCache, void, 2, 2, "saveDatablockCac
       Con::expandScriptFilename(filename_buffer, sizeof(filename_buffer), filename.c_str());
       Torque::Path givenPath(Torque::Path::CompressPath(filename_buffer));
       Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(givenPath);
-      if ( fileRef == NULL )
+      if (fileRef == NULL)
          Con::errorf("saveDatablockCache() failed to get CRC for file '%s'.", filename.c_str());
       else
          afx_saved_db_cache_CRC = (S32)fileRef->getChecksum();
    }
 }
 
-ConsoleMethod( GameConnection, loadDatablockCache, void, 2, 2, "loadDatablockCache()")
+DefineEngineMethod(GameConnection, loadDatablockCache, void, (),, "")
 {
    if (GameConnection::clientCacheEnabled())
    {
@@ -2817,7 +2811,7 @@ ConsoleMethod( GameConnection, loadDatablockCache, void, 2, 2, "loadDatablockCac
    }
 }
 
-ConsoleMethod( GameConnection, loadDatablockCache_Begin, bool, 2, 2, "loadDatablockCache_Begin()")
+DefineEngineMethod(GameConnection, loadDatablockCache_Begin, bool, (),, "")
 {
    if (GameConnection::clientCacheEnabled())
    {
@@ -2827,7 +2821,7 @@ ConsoleMethod( GameConnection, loadDatablockCache_Begin, bool, 2, 2, "loadDatabl
    return false;
 }
 
-ConsoleMethod( GameConnection, loadDatablockCache_Continue, bool, 2, 2, "loadDatablockCache_Continue()")
+DefineEngineMethod(GameConnection, loadDatablockCache_Continue, bool, (),, "")
 {
    if (GameConnection::clientCacheEnabled())
    {

+ 1 - 1
Engine/source/T3D/gameBase/gameProcess.cpp

@@ -34,7 +34,7 @@ ClientProcessList* ClientProcessList::smClientProcessList = NULL;
 ServerProcessList* ServerProcessList::smServerProcessList = NULL;
 static U32 gNetOrderNextId = 0;
 
-DefineConsoleFunction( dumpProcessList, void, ( ), ,
+DefineEngineFunction( dumpProcessList, void, ( ), ,
    "Dumps all ProcessObjects in ServerProcessList and ClientProcessList to the console." )
 {
    Con::printf( "client process list:" );

+ 2 - 2
Engine/source/T3D/gameFunctions.cpp

@@ -114,7 +114,7 @@ static U32 sgServerQueryIndex = 0;
 //SERVER FUNCTIONS ONLY
 ConsoleFunctionGroupBegin( Containers, "Spatial query functions. <b>Server side only!</b>");
 
-DefineConsoleFunction( containerFindFirst, const char*, (U32 typeMask, Point3F origin, Point3F size), , "(int mask, Point3F point, float x, float y, float z)"
+DefineEngineFunction( containerFindFirst, const char*, (U32 typeMask, Point3F origin, Point3F size), , "(int mask, Point3F point, float x, float y, float z)"
    "@brief Find objects matching the bitmask type within a box centered at point, with extents x, y, z.\n\n"
    "@returns The first object found, or an empty string if nothing was found.  Thereafter, you can get more "
    "results using containerFindNext()."
@@ -146,7 +146,7 @@ DefineConsoleFunction( containerFindFirst, const char*, (U32 typeMask, Point3F o
    return buff;
 }
 
-DefineConsoleFunction( containerFindNext, const char*, (), , "()"
+DefineEngineFunction( containerFindNext, const char*, (), , "()"
    "@brief Get more results from a previous call to containerFindFirst().\n\n"
    "@note You must call containerFindFirst() to begin the search.\n"
    "@returns The next object found, or an empty string if nothing else was found.\n"

+ 2 - 2
Engine/source/T3D/lightBase.cpp

@@ -440,7 +440,7 @@ static ConsoleDocFragment _lbplayAnimation2(
    "void playAnimation(LightAnimData anim);"
 );
 
-DefineConsoleMethod( LightBase, playAnimation, void, (const char * anim), (""), "( [LightAnimData anim] )\t"
+DefineEngineMethod( LightBase, playAnimation, void, (const char * anim), (""), "( [LightAnimData anim] )\t"
    "Plays a light animation on the light.  If no LightAnimData is passed the "
    "existing one is played."
    "@hide")
@@ -484,7 +484,7 @@ void LightBase::playAnimation( LightAnimData *animData )
     }
 }
 
-DefineConsoleMethod( LightBase, pauseAnimation, void, (), , "Stops the light animation." )
+DefineEngineMethod( LightBase, pauseAnimation, void, (), , "Stops the light animation." )
 {
     object->pauseAnimation();
 }

+ 1 - 1
Engine/source/T3D/missionMarker.cpp

@@ -494,7 +494,7 @@ ConsoleDocFragment _SpawnSpherespawnObject1(
    "bool spawnObject(string additionalProps);"
 );
 
-DefineConsoleMethod(SpawnSphere, spawnObject, S32, (String additionalProps), ,
+DefineEngineMethod(SpawnSphere, spawnObject, S32, (String additionalProps), ,
    "([string additionalProps]) Spawns the object based on the SpawnSphere's "
    "class, datablock, properties, and script settings. Allows you to pass in "
    "extra properties."

+ 1 - 1
Engine/source/T3D/physics/physicsDebris.cpp

@@ -238,7 +238,7 @@ void PhysicsDebrisData::unpackData(BitStream* stream)
    shapeName   = stream->readSTString();
 }
 
-DefineConsoleMethod( PhysicsDebrisData, preload, void, (), , 
+DefineEngineMethod( PhysicsDebrisData, preload, void, (), , 
    "@brief Loads some information to have readily available at simulation time.\n\n"
    "Forces generation of shaders, materials, and other data used by the %PhysicsDebris object. "
    "This function should be used while a level is loading in order to shorten "

+ 13 - 13
Engine/source/T3D/physics/physicsPlugin.cpp

@@ -124,31 +124,31 @@ void PhysicsPlugin::_debugDraw( SceneManager *graph, const SceneRenderState *sta
       world->onDebugDraw( state );
 }
 
-DefineConsoleFunction( physicsPluginPresent, bool, (), , "physicsPluginPresent()"
+DefineEngineFunction( physicsPluginPresent, bool, (), , "physicsPluginPresent()"
    "@brief Returns true if a physics plugin exists and is initialized.\n\n"
    "@ingroup Physics" )
 {
    return PHYSICSMGR != NULL;
 }
 
-DefineConsoleFunction( physicsInit, bool, (const char * library), ("default"), "physicsInit( [string library] )")
+DefineEngineFunction( physicsInit, bool, (const char * library), ("default"), "physicsInit( [string library] )")
 {
    return PhysicsPlugin::activate( library );
 }
 
-DefineConsoleFunction( physicsDestroy, void, (), , "physicsDestroy()")
+DefineEngineFunction( physicsDestroy, void, (), , "physicsDestroy()")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->destroyPlugin();
 }
 
-DefineConsoleFunction( physicsInitWorld, bool, (const char * worldName), , "physicsInitWorld( String worldName )")
+DefineEngineFunction( physicsInitWorld, bool, (const char * worldName), , "physicsInitWorld( String worldName )")
 {
     bool res = PHYSICSMGR && PHYSICSMGR->createWorld( String( worldName ) );
    return res;
 }
 
-DefineConsoleFunction( physicsDestroyWorld, void, (const char * worldName), , "physicsDestroyWorld( String worldName )")
+DefineEngineFunction( physicsDestroyWorld, void, (const char * worldName), , "physicsDestroyWorld( String worldName )")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->destroyWorld( worldName );
@@ -157,19 +157,19 @@ DefineConsoleFunction( physicsDestroyWorld, void, (const char * worldName), , "p
 
 // Control/query of the stop/started state
 // of the currently running simulation.
-DefineConsoleFunction( physicsStartSimulation, void, (const char * worldName), , "physicsStartSimulation( String worldName )")
+DefineEngineFunction( physicsStartSimulation, void, (const char * worldName), , "physicsStartSimulation( String worldName )")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->enableSimulation( String( worldName ), true );
 }
 
-DefineConsoleFunction( physicsStopSimulation, void, (const char * worldName), , "physicsStopSimulation( String worldName )")
+DefineEngineFunction( physicsStopSimulation, void, (const char * worldName), , "physicsStopSimulation( String worldName )")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->enableSimulation( String( worldName ), false );
 }
 
-DefineConsoleFunction( physicsSimulationEnabled, bool, (), , "physicsStopSimulation( String worldName )")
+DefineEngineFunction( physicsSimulationEnabled, bool, (), , "physicsStopSimulation( String worldName )")
 {
    return PHYSICSMGR && PHYSICSMGR->isSimulationEnabled();
 }
@@ -177,14 +177,14 @@ DefineConsoleFunction( physicsSimulationEnabled, bool, (), , "physicsStopSimulat
 // Used for slowing down time on the
 // physics simulation, and for pausing/restarting
 // the simulation.
-DefineConsoleFunction( physicsSetTimeScale, void, (F32 scale), , "physicsSetTimeScale( F32 scale )")
+DefineEngineFunction( physicsSetTimeScale, void, (F32 scale), , "physicsSetTimeScale( F32 scale )")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->setTimeScale( scale );
 }
 
 // Get the currently set time scale.
-DefineConsoleFunction( physicsGetTimeScale, F32, (), , "physicsGetTimeScale()")
+DefineEngineFunction( physicsGetTimeScale, F32, (), , "physicsGetTimeScale()")
 {
    return PHYSICSMGR && PHYSICSMGR->getTimeScale();
 }
@@ -193,7 +193,7 @@ DefineConsoleFunction( physicsGetTimeScale, F32, (), , "physicsGetTimeScale()")
 // physics simulation that they should store
 // their current state for later restoration,
 // such as when the editor is closed.
-DefineConsoleFunction( physicsStoreState, void, (), , "physicsStoreState()")
+DefineEngineFunction( physicsStoreState, void, (), , "physicsStoreState()")
 {
    PhysicsPlugin::getPhysicsResetSignal().trigger( PhysicsResetEvent_Store );
 }
@@ -201,13 +201,13 @@ DefineConsoleFunction( physicsStoreState, void, (), , "physicsStoreState()")
 // Used to send a signal to objects in the
 // physics simulation that they should restore
 // their saved state, such as when the editor is opened.
-DefineConsoleFunction( physicsRestoreState, void, (), , "physicsRestoreState()")
+DefineEngineFunction( physicsRestoreState, void, (), , "physicsRestoreState()")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->reset();
 }
 
-DefineConsoleFunction( physicsDebugDraw, void, (bool enable), , "physicsDebugDraw( bool enable )")
+DefineEngineFunction( physicsDebugDraw, void, (bool enable), , "physicsDebugDraw( bool enable )")
 {
    if ( PHYSICSMGR )
       PHYSICSMGR->enableDebugDraw( enable );

+ 9 - 11
Engine/source/T3D/player.cpp

@@ -7518,7 +7518,7 @@ U32 Player::lockAnimation()
    return last_anim_lock_tag;
 }
 
-ConsoleMethod(Player, isAnimationLocked, bool, 2, 2, "isAnimationLocked()")
+DefineEngineMethod(Player, isAnimationLocked, bool, (),, "")
 {
    return object->isAnimationLocked();
 }
@@ -7534,14 +7534,13 @@ void Player::setLookAnimationOverride(bool flag)
 #endif
 }
 
-ConsoleMethod(Player, setLookAnimationOverride, void, 3, 3, "setLookAnimationOverride(flag)")
+DefineEngineMethod(Player, setLookAnimationOverride, void, (bool flag),, "")
 {
-   object->setLookAnimationOverride(dAtob(argv[2]));
+   object->setLookAnimationOverride(flag);
 }
 
-ConsoleMethod(Player, copyHeadRotation, void, 3, 3, "copyHeadRotation(other_player)")
+DefineEngineMethod(Player, copyHeadRotation, void, (Player* other_player),, "")
 {
-   Player* other_player = dynamic_cast<Player*>(Sim::findObject(argv[2]));
    if (other_player)
       object->copyHeadRotation(other_player);
 }
@@ -7610,9 +7609,9 @@ void Player::restoreMovement(U32 tag)
    }
 }
 
-ConsoleMethod(Player, setMovementSpeedBias, void, 3, 3, "setMovementSpeedBias(F32 bias)")
+DefineEngineMethod(Player, setMovementSpeedBias, void, (F32 bias),, "setMovementSpeedBias(F32 bias)")
 {
-   object->setMovementSpeedBias(dAtof(argv[2]));
+   object->setMovementSpeedBias(bias);
 }
 
 void Player::overrideFootfallFX(bool decals, bool sounds, bool dust) 
@@ -7643,12 +7642,11 @@ void Player::setControllers(Vector<OpenVRTrackedObject*> controllerList)
    mControllers[1] = controllerList.size() > 1 ? controllerList[1] : NULL;
 }
 
-ConsoleMethod(Player, setVRControllers, void, 4, 4, "")
+DefineEngineMethod(Player, setVRControllers, void, (OpenVRTrackedObject* controllerL, OpenVRTrackedObject* controllerR,, "")
 {
-   OpenVRTrackedObject *controllerL, *controllerR;
    Vector<OpenVRTrackedObject*> list;
 
-   if (Sim::findObject(argv[2], controllerL))
+   if (controllerL)
    {
       list.push_back(controllerL);
    }
@@ -7657,7 +7655,7 @@ ConsoleMethod(Player, setVRControllers, void, 4, 4, "")
       list.push_back(NULL);
    }
 
-   if (Sim::findObject(argv[3], controllerR))
+   if (controllerR)
    {
       list.push_back(controllerR);
    }

+ 2 - 2
Engine/source/T3D/staticShape.cpp

@@ -314,7 +314,7 @@ void StaticShape::unpackUpdate(NetConnection *connection, BitStream *bstream)
 // This appears to be legacy T2 stuff
 // Marked internal, as this is flagged to be deleted
 // [8/1/2010 mperry]
-DefineConsoleMethod( StaticShape, setPoweredState, void, (bool isPowered), , "(bool isPowered)"
+DefineEngineMethod( StaticShape, setPoweredState, void, (bool isPowered), , "(bool isPowered)"
            "@internal")
 {
    if(!object->isServerObject())
@@ -322,7 +322,7 @@ DefineConsoleMethod( StaticShape, setPoweredState, void, (bool isPowered), , "(b
    object->setPowered(isPowered);
 }
 
-DefineConsoleMethod( StaticShape, getPoweredState, bool, (), , "@internal")
+DefineEngineMethod( StaticShape, getPoweredState, bool, (), , "@internal")
 {
    if(!object->isServerObject())
       return(false);

+ 49 - 66
Engine/source/afx/afxCamera.cpp

@@ -450,7 +450,7 @@ const char* afxCamera::getMode()
 //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
 // Console Methods
 
-ConsoleMethod(afxCamera, setOrbitMode, void, 7, 8, 
+DefineEngineStringlyVariadicMethod(afxCamera, setOrbitMode, void, 7, 8,
   "(GameBase orbitObject, TransformF mat, float minDistance, float maxDistance, float curDistance, bool ownClientObject)"
   "Set the camera to orbit around some given object.\n\n"
   "@param   orbitObject  Object we want to orbit.\n"
@@ -481,108 +481,91 @@ ConsoleMethod(afxCamera, setOrbitMode, void, 7, 8,
   object->setOrbitMode(orbitObject, pos, aa, minDis, maxDis, curDis, (argc == 8) ? dAtob(argv[7]) : false);
 }
 
-ConsoleMethod( afxCamera, setFlyMode, void, 2, 2, "()" "Set the camera to be able to fly freely.")
+DefineEngineMethod(afxCamera, setFlyMode, void, (),, 
+   "@brief Set the camera to be able to fly freely.")
 {
-  object->setFlyMode();
+   object->setFlyMode();
 }
 
-ConsoleMethod( afxCamera, getPosition, const char *, 2, 2, "()"
-              "Get the position of the camera.\n\n"
-              "@returns A string of form \"x y z\".")
-{ 
-  Point3F& pos = object->getPosition();
-  char buffer[100];
-  dSprintf(buffer, sizeof(buffer),"%f %f %f",pos.x,pos.y,pos.z);
-  return buffer;
+DefineEngineMethod(afxCamera, getPosition, Point3F, (),,
+   "@brief Get the position of the camera.\n\n"
+   "@returns The position of the camera.")
+{
+   return object->getPosition();
 }
 
-ConsoleMethod(afxCamera, setCameraSubject, bool, 3, 3, "") 
-{   
-  SceneObject* subject;
-  if (!Sim::findObject(argv[2], subject))
-  {
-    Con::errorf("Camera subject \"%s\" not found.", argv[2].getStringValue());
-    return false;
-  }
-  
-  object->setCameraSubject(subject);
-  
-  return true;
+DefineEngineMethod(afxCamera, setCameraSubject, bool, (SceneObject* subject),, "")
+{
+   if (!subject)
+   {
+      Con::errorf("Camera subject not found.");
+      return false;
+   }
+
+   object->setCameraSubject(subject);
+
+   return true;
 }
 
-ConsoleMethod(afxCamera, setThirdPersonDistance, bool, 3, 3, "") 
-{   
-  F32 distance; 
-  dSscanf(argv[2], "%f", &distance);
+DefineEngineMethod(afxCamera, setThirdPersonDistance, bool, (F32 distance),, "")
+{
+   object->setThirdPersonDistance(distance);
 
-  object->setThirdPersonDistance(distance);
-  
-  return true;
+   return true;
 }
 
-ConsoleMethod(afxCamera, getThirdPersonDistance, F32, 2, 2, "")
+DefineEngineMethod(afxCamera, getThirdPersonDistance, F32, (),, "")
 {
    return object->getThirdPersonDistance();
 }
 
-ConsoleMethod(afxCamera, setThirdPersonAngle, bool, 3, 3, "") 
-{   
-  F32 angle; 
-  dSscanf(argv[2], "%f", &angle);
+DefineEngineMethod(afxCamera, setThirdPersonAngle, bool, (F32 distance),, "")
+{
+   object->setThirdPersonAngle(distance);
 
-  object->setThirdPersonAngle(angle);
-  
-  return true;
+   return true;
 }
 
-ConsoleMethod(afxCamera, getThirdPersonAngle, F32, 2, 2, "")
+DefineEngineMethod(afxCamera, getThirdPersonAngle, F32, (),, "")
 {
    return object->getThirdPersonAngle();
 }
 
-ConsoleMethod(afxCamera, setThirdPersonOffset, void, 3, 4, "(Point3F offset [, Point3F coi_offset])") 
+DefineEngineMethod(afxCamera, setThirdPersonOffset, void, (Point3F offset, Point3F coi_offset), (Point3F::Max), "")
 {
-  Point3F offset; 
-  dSscanf(argv[2], "%f %f %f", &offset.x, &offset.y, &offset.z);
-  if (argc > 3)
-  {
-    Point3F coi_offset; 
-    dSscanf(argv[3], "%f %f %f", &coi_offset.x, &coi_offset.y, &coi_offset.z);
-    object->setThirdPersonOffset(offset, coi_offset);
-  }
-  else
-    object->setThirdPersonOffset(offset);
+   if (coi_offset == Point3F::Max)
+   {
+      object->setThirdPersonOffset(offset);
+   }
+   else
+   {
+      object->setThirdPersonOffset(offset, coi_offset);
+   }
 }
 
-ConsoleMethod(afxCamera, getThirdPersonOffset, const char *, 2, 2, "()")
+DefineEngineMethod(afxCamera, getThirdPersonOffset, Point3F, (),, "")
 {
-  const Point3F& pos = object->getThirdPersonOffset();
-  char buffer[100];
-  dSprintf(buffer, sizeof(buffer),"%f %f %f",pos.x,pos.y,pos.z);
-  return buffer;
+   return object->getThirdPersonOffset();
 }
 
-ConsoleMethod(afxCamera, getThirdPersonCOIOffset, const char *, 2, 2, "()")
+DefineEngineMethod(afxCamera, getThirdPersonCOIOffset, Point3F, (),, "")
 {
-  const Point3F& pos = object->getThirdPersonCOIOffset();
-  char buffer[100];
-  dSprintf(buffer, sizeof(buffer),"%f %f %f",pos.x,pos.y,pos.z);
-  return buffer;
+   return object->getThirdPersonCOIOffset();
 }
 
-ConsoleMethod(afxCamera, setThirdPersonMode, void, 2, 2, "()")
+DefineEngineMethod(afxCamera, setThirdPersonMode, void, (),, "")
 {
-  object->setThirdPersonMode();
+   object->setThirdPersonMode();
 }
 
-ConsoleMethod(afxCamera, setThirdPersonSnap, void, 2, 2, "()")
+DefineEngineMethod(afxCamera, setThirdPersonSnap, void, (),, "")
 {
-  object->setThirdPersonSnap();
+   object->setThirdPersonSnap();
 }
 
-ConsoleMethod(afxCamera, getMode, const char *, 2, 2, "()")
+DefineEngineMethod(afxCamera, getMode, const char*, (),, "")
 {
-  return object->getMode();
+   return object->getMode();
 }
 
 //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//

+ 22 - 22
Engine/source/afx/afxMagicSpell.cpp

@@ -2633,29 +2633,29 @@ DefineEngineMethod(afxMagicSpell, getImpactedObject, S32, (),,
   return (imp_obj) ? imp_obj->getId() : -1;
 }
 
-ConsoleMethod(afxMagicSpell, setTimeFactor, void, 3, 4, "(F32 factor) or (string phase, F32 factor)"
-              "Sets the time-factor for the spell, either overall or for a specific phrase.\n\n"
-              "@ingroup AFX")
+DefineEngineStringlyVariadicMethod(afxMagicSpell, setTimeFactor, void, 3, 4, "(F32 factor) or (string phase, F32 factor)"
+   "Sets the time-factor for the spell, either overall or for a specific phrase.\n\n"
+   "@ingroup AFX")
 {
-  if (argc == 3)
-    object->setTimeFactor(dAtof(argv[2]));
-  else
-  {
-    if (dStricmp(argv[2], "overall") == 0)
-      object->setTimeFactor(dAtof(argv[3]));
-    else if (dStricmp(argv[2], "casting") == 0)
-      object->setTimeFactor(afxMagicSpell::CASTING_PHRASE, dAtof(argv[3]));
-    else if (dStricmp(argv[2], "launch") == 0)
-      object->setTimeFactor(afxMagicSpell::LAUNCH_PHRASE, dAtof(argv[3]));
-    else if (dStricmp(argv[2], "delivery") == 0)
-      object->setTimeFactor(afxMagicSpell::DELIVERY_PHRASE, dAtof(argv[3]));
-    else if (dStricmp(argv[2], "impact") == 0)
-      object->setTimeFactor(afxMagicSpell::IMPACT_PHRASE, dAtof(argv[3]));
-    else if (dStricmp(argv[2], "linger") == 0)
-      object->setTimeFactor(afxMagicSpell::LINGER_PHRASE, dAtof(argv[3]));
-    else
-      Con::errorf("afxMagicSpell::setTimeFactor() -- unknown spell phrase [%s].", argv[2].getStringValue());
-  }
+   if (argc == 3)
+      object->setTimeFactor(dAtof(argv[2]));
+   else
+   {
+      if (dStricmp(argv[2], "overall") == 0)
+         object->setTimeFactor(dAtof(argv[3]));
+      else if (dStricmp(argv[2], "casting") == 0)
+         object->setTimeFactor(afxMagicSpell::CASTING_PHRASE, dAtof(argv[3]));
+      else if (dStricmp(argv[2], "launch") == 0)
+         object->setTimeFactor(afxMagicSpell::LAUNCH_PHRASE, dAtof(argv[3]));
+      else if (dStricmp(argv[2], "delivery") == 0)
+         object->setTimeFactor(afxMagicSpell::DELIVERY_PHRASE, dAtof(argv[3]));
+      else if (dStricmp(argv[2], "impact") == 0)
+         object->setTimeFactor(afxMagicSpell::IMPACT_PHRASE, dAtof(argv[3]));
+      else if (dStricmp(argv[2], "linger") == 0)
+         object->setTimeFactor(afxMagicSpell::LINGER_PHRASE, dAtof(argv[3]));
+      else
+         Con::errorf("afxMagicSpell::setTimeFactor() -- unknown spell phrase [%s].", argv[2].getStringValue());
+   }
 }
 
 DefineEngineMethod(afxMagicSpell, interruptStage, void, (),,

+ 24 - 60
Engine/source/afx/arcaneFX.cpp

@@ -584,69 +584,33 @@ DefineEngineFunction(getRandomDir, Point3F, (Point3F axis, float thetaMin, float
   return MathUtils::randomDir(axis, thetaMin, thetaMax, phiMin, phiMax);
 }
 
-ConsoleFunction( MatrixInverseMulVector, const char*, 3, 3, "(MatrixF xfrm, Point3F vector)"
-                "@brief Multiply the vector by the affine inverse of the transform.\n\n"
-                "@ingroup AFX")
+DefineEngineFunction(MatrixInverseMulVector, Point3F, (MatrixF xfrm, Point3F vector),,
+   "@brief Multiply the vector by the affine inverse of the transform.\n\n"
+   "@ingroup AFX")
 {
-   Point3F pos1(0.0f,0.0f,0.0f);
-   AngAxisF aa1(Point3F(0.0f,0.0f,0.0f),0.0f);
-   dSscanf(argv[1], "%g %g %g %g %g %g %g", &pos1.x, &pos1.y, &pos1.z, &aa1.axis.x, &aa1.axis.y, &aa1.axis.z, &aa1.angle);
-
-   MatrixF temp1(true);
-   aa1.setMatrix(&temp1);
-   temp1.setColumn(3, pos1);
-
-   Point3F vec1(0.0f,0.0f,0.0f);
-   dSscanf(argv[2], "%g %g %g", &vec1.x, &vec1.y, &vec1.z);
-
-   temp1.affineInverse();
+   xfrm.affineInverse();
 
    Point3F result;
-   temp1.mulV(vec1, &result);
+   xfrm.mulV(vector, &result);
 
-   char* ret = Con::getReturnBuffer(256);
-   dSprintf(ret, 255, "%g %g %g", result.x, result.y, result.z);
-   return ret;
+   return result;
 }
 
-ConsoleFunction(moveTransformAbs, const char*, 3, 3, "(MatrixF xfrm, Point3F pos)"
-                "@brief Move the transform to the new absolute position.\n\n"
-                "@ingroup AFX")
+DefineEngineFunction(moveTransformAbs, MatrixF, (MatrixF xfrm, Point3F pos),,
+   "@brief Move the transform to the new absolute position.\n\n"
+   "@ingroup AFX")
 {
-   Point3F pos1(0.0f,0.0f,0.0f);
-   AngAxisF aa1(Point3F(0.0f,0.0f,0.0f),0.0f);
-   dSscanf(argv[1], "%g %g %g %g %g %g %g", &pos1.x, &pos1.y, &pos1.z, &aa1.axis.x, &aa1.axis.y, &aa1.axis.z, &aa1.angle);
-
-   Point3F pos2(0.0f,0.0f,0.0f);
-   dSscanf(argv[2], "%g %g %g", &pos2.x, &pos2.y, &pos2.z);
-
-   char* returnBuffer = Con::getReturnBuffer(256);
-   dSprintf(returnBuffer, 255, "%g %g %g %g %g %g %g",
-            pos2.x, pos2.y, pos2.z,
-            aa1.axis.x, aa1.axis.y, aa1.axis.z,
-            aa1.angle);
-   return returnBuffer;
+   xfrm.setPosition(pos);
+   return xfrm;
 }
 
-ConsoleFunction(moveTransformRel, const char*, 3, 3, "(MatrixF xfrm, Point3F pos)"
-                "@brief Move the transform to the new relative position.\n\n"
-                "@ingroup AFX")
+DefineEngineFunction(moveTransformRel, MatrixF, (MatrixF xfrm, Point3F pos),,
+   "@brief Move the transform to the new relative position.\n\n"
+   "@ingroup AFX")
 {
-   Point3F pos1(0.0f,0.0f,0.0f);
-   AngAxisF aa1(Point3F(0.0f,0.0f,0.0f),0.0f);
-   dSscanf(argv[1], "%g %g %g %g %g %g %g", &pos1.x, &pos1.y, &pos1.z, &aa1.axis.x, &aa1.axis.y, &aa1.axis.z, &aa1.angle);
-
-   Point3F pos2(0.0f,0.0f,0.0f);
-   dSscanf(argv[2], "%g %g %g", &pos2.x, &pos2.y, &pos2.z);
-
-   pos2 += pos1;
-
-   char* returnBuffer = Con::getReturnBuffer(256);
-   dSprintf(returnBuffer, 255, "%g %g %g %g %g %g %g",
-            pos2.x, pos2.y, pos2.z,
-            aa1.axis.x, aa1.axis.y, aa1.axis.z,
-            aa1.angle);
-   return returnBuffer;
+   pos += xfrm.getPosition();
+   xfrm.setPosition(pos);
+   return xfrm;
 }
 
 DefineEngineFunction(getFreeTargetPosition, Point3F, (),,
@@ -896,18 +860,18 @@ DefineEngineFunction(getMaxF, F32, (float a, float b),,
    return getMax(a, b);
 }
 
-ConsoleFunction(echoThru, const char*, 2, 0, "(string passthru, string text...)"
-                "Like echo(), but first argument is returned.\n"
-                "@ingroup AFX")
+DefineEngineStringlyVariadicFunction(echoThru, const char*, 2, 0, "(string passthru, string text...)"
+   "Like echo(), but first argument is returned.\n"
+   "@ingroup AFX")
 {
    U32 len = 0;
    S32 i;
-   for(i = 2; i < argc; i++)
+   for (i = 2; i < argc; i++)
       len += dStrlen(argv[i]);
 
    char *ret = Con::getReturnBuffer(len + 1);
    ret[0] = 0;
-   for(i = 2; i < argc; i++)
+   for (i = 2; i < argc; i++)
       dStrcat(ret, argv[i], len + 1);
 
    Con::printf("%s -- [%s]", ret, argv[1].getStringValue());
@@ -916,7 +880,7 @@ ConsoleFunction(echoThru, const char*, 2, 0, "(string passthru, string text...)"
    return argv[1];
 }
 
-ConsoleFunction(warnThru, const char*, 2, 0, "(string passthru, string text...)"
+DefineEngineStringlyVariadicFunction(warnThru, const char*, 2, 0, "(string passthru, string text...)"
                 "Like warn(), but first argument is returned.\n"
                 "@ingroup AFX")
 {
@@ -936,7 +900,7 @@ ConsoleFunction(warnThru, const char*, 2, 0, "(string passthru, string text...)"
    return argv[1];
 }
 
-ConsoleFunction(errorThru, const char*, 2, 0, "(string passthru, string text...)"
+DefineEngineStringlyVariadicFunction(errorThru, const char*, 2, 0, "(string passthru, string text...)"
                 "Like error(), but first argument is returned.\n"
                 "@ingroup AFX")
 {

+ 15 - 13
Engine/source/app/game.cpp

@@ -67,7 +67,7 @@ bool gEditingMission = false;
 
 ConsoleFunctionGroupBegin( InputManagement, "Functions that let you deal with input from scripts" );
 
-DefineConsoleFunction( deactivateDirectInput, void, (), ,
+DefineEngineFunction( deactivateDirectInput, void, (), ,
          "()"
             "@brief Disables DirectInput.\n\n"
             "Also deactivates any connected joysticks.\n\n"
@@ -77,7 +77,7 @@ DefineConsoleFunction( deactivateDirectInput, void, (), ,
       Input::deactivate();
 }
 
-DefineConsoleFunction( activateDirectInput, void, (), ,
+DefineEngineFunction( activateDirectInput, void, (), ,
             "()"
             "@brief Activates DirectInput.\n\n"
             "Also activates any connected joysticks."
@@ -91,7 +91,7 @@ ConsoleFunctionGroupEnd( InputManagement );
 //--------------------------------------------------------------------------
 
 static const U32 MaxPlayerNameLength = 16;
-DefineConsoleFunction( strToPlayerName, const char*, (const char* ptr ), , "strToPlayerName(string);" )
+DefineEngineFunction( strToPlayerName, const char*, (const char* ptr ), , "strToPlayerName(string);" )
 {
 
 	// Strip leading spaces and underscores:
@@ -147,7 +147,7 @@ DefineConsoleFunction( strToPlayerName, const char*, (const char* ptr ), , "strT
 
 ConsoleFunctionGroupBegin( Platform , "General platform functions.");
 
-DefineConsoleFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)" 
+DefineEngineFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)"
             "@brief Lock or unlock the mouse to the window.\n\n"
             "When true, prevents the mouse from leaving the bounds of the game window.\n\n"
             "@ingroup Input")
@@ -156,7 +156,7 @@ DefineConsoleFunction( lockMouse, void, (bool isLocked ), , "(bool isLocked)"
 }
 
 
-DefineConsoleFunction( setNetPort, bool, (int port, bool bind), (true), "(int port, bool bind=true)" 
+DefineEngineFunction( setNetPort, bool, (int port, bool bind), (true), "(int port, bool bind=true)" 
    "@brief Set the network port for the game to use.\n\n"
 
    "@param port The port to use.\n"
@@ -171,28 +171,28 @@ DefineConsoleFunction( setNetPort, bool, (int port, bool bind), (true), "(int po
    return Net::openPort((S32)port, bind);
 }
 
-DefineConsoleFunction(isAddressTypeAvailable, bool, (int addressType), , "(protocol id)"
+DefineEngineFunction(isAddressTypeAvailable, bool, (int addressType), , "(protocol id)"
 	"@brief Determines if a specified address type can be reached.\n\n"
 	"@ingroup Networking")
 {
 	return Net::isAddressTypeAvailable((NetAddress::Type)addressType);
 }
 
-DefineConsoleFunction( closeNetPort, void, (), , "()" 
+DefineEngineFunction( closeNetPort, void, (), , "()" 
    "@brief Closes the current network port\n\n"
    "@ingroup Networking")
 {
    Net::closePort();
 }
 
-DefineConsoleFunction( saveJournal, void, (const char * filename), , "(string filename)" 
+DefineEngineFunction( saveJournal, void, (const char * filename), , "(string filename)" 
                 "Save the journal to the specified file.\n\n"
 				"@ingroup Platform")
 {
    Journal::Record(filename);
 }
 
-DefineConsoleFunction( playJournal, void, (const char * filename), , "(string filename)" 
+DefineEngineFunction( playJournal, void, (const char * filename), , "(string filename)" 
                 "@brief Begin playback of a journal from a specified field.\n\n"
 				"@param filename Name and path of file journal file\n"
 				"@ingroup Platform")
@@ -202,7 +202,7 @@ DefineConsoleFunction( playJournal, void, (const char * filename), , "(string fi
    Journal::Play(filename);
 }
 
-DefineConsoleFunction( getSimTime, S32, (), , "()" 
+DefineEngineFunction( getSimTime, S32, (), , "()" 
 				"Return the current sim time in milliseconds.\n\n"
                 "@brief Sim time is time since the game started.\n\n"
 				"@ingroup Platform")
@@ -210,7 +210,7 @@ DefineConsoleFunction( getSimTime, S32, (), , "()"
    return Sim::getCurrentTime();
 }
 
-DefineConsoleFunction( getRealTime, S32, (), , "()" 
+DefineEngineFunction( getRealTime, S32, (), , "()" 
 				"@brief Return the current real time in milliseconds.\n\n"
                 "Real time is platform defined; typically time since the computer booted.\n\n"
 				"@ingroup Platform")
@@ -218,8 +218,10 @@ DefineConsoleFunction( getRealTime, S32, (), , "()"
    return Platform::getRealMilliseconds();
 }
 
-ConsoleFunction( getLocalTime, const char *, 1, 1, "Return the current local time as: weekday month day year hour min sec.\n\n"
-                "Local time is platform defined.")
+DefineEngineFunction(getLocalTime, const char*, (),,
+   "@brief Return the current local time as: weekday month day year hour min sec.\n\n"
+   "Local time is platform defined."
+   "@ingroup Platform")
 {
    Platform::LocalTime lt;
    Platform::getLocalTime(lt);

+ 3 - 3
Engine/source/app/net/net.cpp

@@ -212,7 +212,7 @@ ConsoleDocClass( RemoteCommandEvent,
 ConsoleFunctionGroupBegin( Net, "Functions for use with the network; tagged strings and remote commands.");
 
 
-ConsoleFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandArgs + 1, "(string func, ...)"
+DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandArgs + 1, "(string func, ...)"
 	"@brief Send a command to the server.\n\n"
 
    "@param func Name of the server command being called\n"
@@ -255,7 +255,7 @@ ConsoleFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandA
    RemoteCommandEvent::sendRemoteCommand(conn, args.count(), args);
 }
 
-ConsoleFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandArgs + 2, "(NetConnection client, string func, ...)"
+DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandArgs + 2, "(NetConnection client, string func, ...)"
    "@brief Send a command from the server to the client\n\n"
 
    "@param client The numeric ID of a client GameConnection\n"
@@ -349,7 +349,7 @@ DefineEngineFunction(getTaggedString, const char* , (const char *tag), (""),
 
 
 
-ConsoleFunction( buildTaggedString, const char*, 2, 11, "(string format, ...)"
+DefineEngineStringlyVariadicFunction( buildTaggedString, const char*, 2, 11, "(string format, ...)"
    "@brief Build a string using the specified tagged string format.\n\n"
 
    "This function takes an already tagged string (passed in as a tagged string ID) and one "

+ 10 - 10
Engine/source/app/net/serverQuery.cpp

@@ -429,7 +429,7 @@ void queryLanServers(U32 port, U8 flags, const char* gameType, const char* missi
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( queryAllServers
+DefineEngineFunction( queryAllServers
                      , void, ( U32 lanPort
                              , U32 flags
                              , const char * gameType
@@ -455,7 +455,7 @@ DefineConsoleFunction( queryAllServers
 
 }
 
-DefineConsoleFunction( queryLanServers
+DefineEngineFunction( queryLanServers
                      , void, ( U32 lanPort
                              , U32 flags
                              , const char * gameType
@@ -560,7 +560,7 @@ void queryMasterServer(U8 flags, const char* gameType, const char* missionType,
       processMasterServerQuery( gPingSession );
 }
 
-DefineConsoleFunction( queryMasterServer
+DefineEngineFunction( queryMasterServer
                      , void, (  U32 flags
                              , const char * gameType
                              , const char * missionType
@@ -582,7 +582,7 @@ DefineConsoleFunction( queryMasterServer
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( querySingleServer
+DefineEngineFunction( querySingleServer
                      , void, ( const char* addrText, U8 flags )
                      , (0), "querySingleServer(address, flags);" )
 {
@@ -668,7 +668,7 @@ void cancelServerQuery()
    }
 }
 
-DefineConsoleFunction( cancelServerQuery, void, (), , "cancelServerQuery();" )
+DefineEngineFunction( cancelServerQuery, void, (), , "cancelServerQuery();" )
 {
    cancelServerQuery();
 }
@@ -696,14 +696,14 @@ void stopServerQuery()
    }
 }
 
-DefineConsoleFunction( stopServerQuery, void, (), , "stopServerQuery();" )
+DefineEngineFunction( stopServerQuery, void, (), , "stopServerQuery();" )
 {
    stopServerQuery();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( startHeartbeat, void, (), , "startHeartbeat();" )
+DefineEngineFunction( startHeartbeat, void, (), , "startHeartbeat();" )
 {
    if (validateAuthenticatedServer()) {
       gHeartbeatSeq++;
@@ -711,19 +711,19 @@ DefineConsoleFunction( startHeartbeat, void, (), , "startHeartbeat();" )
    }
 }
 
-DefineConsoleFunction( stopHeartbeat, void, (), , "stopHeartbeat();" )
+DefineEngineFunction( stopHeartbeat, void, (), , "stopHeartbeat();" )
 {
    gHeartbeatSeq++;
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getServerCount, int, (), , "getServerCount();" )
+DefineEngineFunction( getServerCount, int, (), , "getServerCount();" )
 {
    return gServerList.size();
 }
 
-DefineConsoleFunction( setServerInfo, bool, (U32 index), , "setServerInfo(index);" )
+DefineEngineFunction( setServerInfo, bool, (U32 index), , "setServerInfo(index);" )
 {
    if (index < gServerList.size()) {
       ServerInfo& info = gServerList[index];

+ 7 - 7
Engine/source/app/version.cpp

@@ -92,44 +92,44 @@ const char* getCompileTimeString()
 
 ConsoleFunctionGroupBegin( CompileInformation, "Functions to get version information about the current executable." );
 
-DefineConsoleFunction( getVersionNumber, S32, (), , "Get the version of the engine build, as a string.\n\n" 
+DefineEngineFunction( getVersionNumber, S32, (), , "Get the version of the engine build, as a string.\n\n" 
 				"@ingroup Debugging")
 {
    return getVersionNumber();
 }
 
-DefineConsoleFunction( getAppVersionNumber, S32, (), , "Get the version of the application build, as a string.\n\n" 
+DefineEngineFunction( getAppVersionNumber, S32, (), , "Get the version of the application build, as a string.\n\n" 
             "@ingroup Debugging")
 {
    return getAppVersionNumber();
 }
 
 
-DefineConsoleFunction( getVersionString, const char*, (), , "Get the version of the engine build, as a human readable string.\n\n" 
+DefineEngineFunction( getVersionString, const char*, (), , "Get the version of the engine build, as a human readable string.\n\n" 
 				"@ingroup Debugging")
 {
    return getVersionString();
 }
 
-DefineConsoleFunction( getAppVersionString, const char*, (), , "Get the version of the aplication build, as a human readable string.\n\n" 
+DefineEngineFunction( getAppVersionString, const char*, (), , "Get the version of the aplication build, as a human readable string.\n\n" 
             "@ingroup Debugging")
 {
    return getAppVersionString();
 }
 
-DefineConsoleFunction( getEngineName, const char*, (), , "Get the name of the engine product that this is running from, as a string.\n\n" 
+DefineEngineFunction( getEngineName, const char*, (), , "Get the name of the engine product that this is running from, as a string.\n\n" 
 				"@ingroup Debugging")
 {
    return getEngineProductString();
 }
 
-DefineConsoleFunction( getCompileTimeString, const char*, (), , "Get the time of compilation.\n\n" 
+DefineEngineFunction( getCompileTimeString, const char*, (), , "Get the time of compilation.\n\n" 
 				"@ingroup Debugging")
 {
    return getCompileTimeString();
 }
 
-DefineConsoleFunction( getBuildString, const char*, (), , "Get the type of build, \"Debug\" or \"Release\".\n\n"
+DefineEngineFunction( getBuildString, const char*, (), , "Get the type of build, \"Debug\" or \"Release\".\n\n"
 				"@ingroup Debugging")
 {
 #ifdef TORQUE_DEBUG

+ 4 - 4
Engine/source/assets/assetQuery_ScriptBinding.h

@@ -26,7 +26,7 @@
 
 #include "console/engineAPI.h"
 
-DefineConsoleMethod(AssetQuery, clear, void, (),,"Clears all asset Id results."
+DefineEngineMethod(AssetQuery, clear, void, (),,"Clears all asset Id results."
    "Clears all asset Id results.\n"
    "@return () No return value.\n")
 {
@@ -36,7 +36,7 @@ DefineConsoleMethod(AssetQuery, clear, void, (),,"Clears all asset Id results."
 //-----------------------------------------------------------------------------
 
 
-DefineConsoleMethod(AssetQuery, set, bool, (S32 queryId), ,
+DefineEngineMethod(AssetQuery, set, bool, (S32 queryId), ,
    "Sets the asset query to a copy of the specified asset query.\n"
    "@param assetQuery The asset query to copy.\n"
    "@return Whether the operation succeeded or not.\n")
@@ -59,7 +59,7 @@ DefineConsoleMethod(AssetQuery, set, bool, (S32 queryId), ,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(AssetQuery, getCount, S32, (), , 
+DefineEngineMethod(AssetQuery, getCount, S32, (), , 
    "Gets the count of asset Id results.\n"
    "@return (int)The count of asset Id results.\n")
 {
@@ -68,7 +68,7 @@ DefineConsoleMethod(AssetQuery, getCount, S32, (), ,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(AssetQuery, getAsset, const char*, (S32 resultIndex), (-1), 
+DefineEngineMethod(AssetQuery, getAsset, const char*, (S32 resultIndex), (-1), 
    "Gets the asset Id at the specified query result index.\n"
    "@param resultIndex The query result index to use.\n"
    "@return (assetId)The asset Id at the specified index or NULL if not valid.\n")

+ 1 - 1
Engine/source/cinterface/c_scripting.cpp

@@ -420,7 +420,7 @@ extern "C" {
 }
 
 
-ConsoleFunction(TestFunction2Args, const char *, 3, 3, "testFunction(arg1, arg2)")
+DefineEngineStringlyVariadicFunction(TestFunction2Args, const char *, 3, 3, "testFunction(arg1, arg2)")
 {
    return "Return Value";
 }

+ 1 - 1
Engine/source/cinterface/cinterface.cpp

@@ -436,7 +436,7 @@ extern "C" {
 // By default, it is marked as secure by the web plugins and then can be called from
 // Javascript on the web page to ensure that function calls across the language
 // boundry are working with arguments and return values
-DefineConsoleFunction( testJavaScriptBridge, const char *, (const char* arg1, const char* arg2, const char* arg3), , "testBridge(arg1, arg2, arg3)")
+DefineEngineFunction( testJavaScriptBridge, const char *, (const char* arg1, const char* arg2, const char* arg3), , "testBridge(arg1, arg2, arg3)")
 {
 	S32 failed = 0;
 		if (dStrcmp(arg1,"one"))

+ 2 - 2
Engine/source/console/SimXMLDocument.cpp

@@ -571,7 +571,7 @@ DefineEngineMethod( SimXMLDocument, attribute, const char*, ( const char* attrib
 }
 
 // These two methods don't make a lot of sense the way TS works.  Leaving them in for backwards-compatibility.
-DefineConsoleMethod( SimXMLDocument, attributeF32, F32, (const char * attributeName), , "(string attributeName)"
+DefineEngineMethod( SimXMLDocument, attributeF32, F32, (const char * attributeName), , "(string attributeName)"
    "@brief Get float attribute from the current Element on the stack.\n\n"
    "@param attributeName Name of attribute to retrieve.\n"
    "@return The value of the given attribute in the form of a float.\n"
@@ -580,7 +580,7 @@ DefineConsoleMethod( SimXMLDocument, attributeF32, F32, (const char * attributeN
    return dAtof( object->attribute( attributeName ) );
 }
 
-DefineConsoleMethod(SimXMLDocument, attributeS32, S32, (const char * attributeName), , "(string attributeName)"
+DefineEngineMethod(SimXMLDocument, attributeS32, S32, (const char * attributeName), , "(string attributeName)"
    "@brief Get int attribute from the current Element on the stack.\n\n"
    "@param attributeName Name of attribute to retrieve.\n"
    "@return The value of the given attribute in the form of an integer.\n"

+ 3 - 3
Engine/source/console/console.cpp

@@ -277,7 +277,7 @@ bool useTimestamp = false;
 
 ConsoleFunctionGroupBegin( Clipboard, "Miscellaneous functions to control the clipboard and clear the console.");
 
-DefineConsoleFunction( cls, void, (), , "()"
+DefineEngineFunction( cls, void, (), , "()"
             "@brief Clears the console output.\n\n"
             "@ingroup Console")
 {
@@ -287,14 +287,14 @@ DefineConsoleFunction( cls, void, (), , "()"
    consoleLog.setSize(0);
 };
 
-DefineConsoleFunction( getClipboard, const char*, (), , "()"
+DefineEngineFunction( getClipboard, const char*, (), , "()"
             "@brief Get text from the clipboard.\n\n"
             "@internal")
 {
    return Platform::getClipboard();
 };
 
-DefineConsoleFunction( setClipboard, bool, (const char* text), , "(string text)"
+DefineEngineFunction( setClipboard, bool, (const char* text), , "(string text)"
                "@brief Set the system clipboard.\n\n"
             "@internal")
 {

+ 0 - 32
Engine/source/console/console.h

@@ -1191,11 +1191,6 @@ public:
 #  define ConsoleFunctionGroupBegin(groupName, usage) \
       static ConsoleConstructor cfg_ConsoleFunctionGroup_##groupName##_GroupBegin(NULL,#groupName,usage)
 
-#  define ConsoleFunction(name,returnType,minArgs,maxArgs,usage1) \
-   returnType cf_##name(SimObject *, S32, ConsoleValueRef *argv); \
-   ConsoleConstructor cc_##name##_obj(NULL,#name,cf_##name,usage1,minArgs,maxArgs); \
-      returnType cf_##name(SimObject *, S32 argc, ConsoleValueRef *argv)
-
 #  define ConsoleToolFunction(name,returnType,minArgs,maxArgs,usage1) \
    returnType ctf_##name(SimObject *, S32, ConsoleValueRef *argv); \
    ConsoleConstructor cc_##name##_obj(NULL,#name,ctf_##name,usage1,minArgs,maxArgs, true); \
@@ -1211,24 +1206,6 @@ public:
 #  define ConsoleMethodGroupBegin(className, groupName, usage) \
    static ConsoleConstructor cc_##className##_##groupName##_GroupBegin(#className,#groupName,usage)
 
-#  define ConsoleMethod(className,name,returnType,minArgs,maxArgs,usage1) \
-   inline returnType cm_##className##_##name(className *, S32, ConsoleValueRef *argv); \
-   returnType cm_##className##_##name##_caster(SimObject *object, S32 argc, ConsoleValueRef *argv) { \
-         AssertFatal( dynamic_cast<className*>( object ), "Object passed to " #name " is not a " #className "!" ); \
-         conmethod_return_##returnType ) cm_##className##_##name(static_cast<className*>(object),argc,argv); \
-      };                                                                                              \
-      ConsoleConstructor cc_##className##_##name##_obj(#className,#name,cm_##className##_##name##_caster,usage1,minArgs,maxArgs); \
-      inline returnType cm_##className##_##name(className *object, S32 argc, ConsoleValueRef *argv)
-
-#  define ConsoleStaticMethod(className,name,returnType,minArgs,maxArgs,usage1) \
-   inline returnType cm_##className##_##name(S32, ConsoleValueRef *); \
-   returnType cm_##className##_##name##_caster(SimObject *object, S32 argc, ConsoleValueRef *argv) { \
-   conmethod_return_##returnType ) cm_##className##_##name(argc,argv); \
-   }; \
-   ConsoleConstructor \
-   cc_##className##_##name##_obj(#className,#name,cm_##className##_##name##_caster,usage1,minArgs,maxArgs); \
-   inline returnType cm_##className##_##name(S32 argc, ConsoleValueRef *argv)
-
 #  define ConsoleMethodGroupEnd(className, groupName) \
    static ConsoleConstructor cc_##className##_##groupName##_GroupEnd(#className,#groupName,NULL)
 
@@ -1268,15 +1245,6 @@ public:
          className##name##obj(#className,#name,c##className##name##caster,"",minArgs,maxArgs);        \
       static inline returnType c##className##name(className *object, S32 argc, ConsoleValueRef *argv)
 
-#  define ConsoleStaticMethod(className,name,returnType,minArgs,maxArgs,usage1)                       \
-      static inline returnType c##className##name(S32, ConsoleValueRef*);                                \
-      static returnType c##className##name##caster(SimObject *object, S32 argc, ConsoleValueRef *argv) {  \
-         conmethod_return_##returnType ) c##className##name(argc,argv);                                                        \
-      };                                                                                              \
-      static ConsoleConstructor                                                                       \
-         className##name##obj(#className,#name,c##className##name##caster,"",minArgs,maxArgs);        \
-      static inline returnType c##className##name(S32 argc, ConsoleValueRef *argv)
-
 #define ConsoleDoc( text )
 
 #endif

+ 2 - 2
Engine/source/console/consoleDoc.cpp

@@ -41,7 +41,7 @@
 
 ConsoleFunctionGroupBegin(ConsoleDoc, "Console self-documentation functions. These output psuedo C++ suitable for feeeding through Doxygen or another auto documentation tool.");
 
-DefineConsoleFunction( dumpConsoleClasses, void, (bool dumpScript, bool dumpEngine), ( true, true ),
+DefineEngineFunction( dumpConsoleClasses, void, (bool dumpScript, bool dumpEngine), ( true, true ),
             "@brief Dumps all declared console classes to the console.\n\n"
             "@param dumpScript Optional parameter specifying whether or not classes defined in script should be dumped.\n"
             "@param dumpEngine Optional parameter specifying whether or not classes defined in the engine should be dumped.\n"
@@ -50,7 +50,7 @@ DefineConsoleFunction( dumpConsoleClasses, void, (bool dumpScript, bool dumpEngi
    Namespace::dumpClasses( dumpScript, dumpEngine );
 }
 
-DefineConsoleFunction(dumpConsoleFunctions, void, ( bool dumpScript, bool dumpEngine ), ( true, true ),
+DefineEngineFunction(dumpConsoleFunctions, void, ( bool dumpScript, bool dumpEngine ), ( true, true ),
             "@brief Dumps all declared console functions to the console.\n"
             "@param dumpScript Optional parameter specifying whether or not functions defined in script should be dumped.\n"
             "@param dumpEngine Optional parameter specitying whether or not functions defined in the engine should be dumped.\n"

+ 107 - 110
Engine/source/console/consoleFunctions.cpp

@@ -184,7 +184,7 @@ bool isValidPort(U16 port)
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strasc, int, ( const char* chr ),,
+DefineEngineFunction( strasc, int, ( const char* chr ),,
    "Return the integer character code value corresponding to the first character in the given string.\n"
    "@param chr a (one-character) string.\n"
    "@return the UTF32 code value for the first character in the given string.\n"
@@ -195,7 +195,7 @@ DefineConsoleFunction( strasc, int, ( const char* chr ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strformat, const char*, ( const char* format, const char* value ),,
+DefineEngineFunction( strformat, const char*, ( const char* format, const char* value ),,
    "Format the given value as a string using printf-style formatting.\n"
    "@param format A printf-style format string.\n"
    "@param value The value argument matching the given format string.\n\n"
@@ -252,7 +252,7 @@ DefineConsoleFunction( strformat, const char*, ( const char* format, const char*
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strcmp, S32, ( const char* str1, const char* str2 ),,
+DefineEngineFunction( strcmp, S32, ( const char* str1, const char* str2 ),,
    "Compares two strings using case-<b>sensitive</b> comparison.\n"
    "@param str1 The first string.\n"
    "@param str2 The second string.\n"
@@ -271,7 +271,7 @@ DefineConsoleFunction( strcmp, S32, ( const char* str1, const char* str2 ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( stricmp, S32, ( const char* str1, const char* str2 ),,
+DefineEngineFunction( stricmp, S32, ( const char* str1, const char* str2 ),,
    "Compares two strings using case-<b>insensitive</b> comparison.\n"
    "@param str1 The first string.\n"
    "@param str2 The second string.\n"
@@ -290,7 +290,7 @@ DefineConsoleFunction( stricmp, S32, ( const char* str1, const char* str2 ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strnatcmp, S32, ( const char* str1, const char* str2 ),,
+DefineEngineFunction( strnatcmp, S32, ( const char* str1, const char* str2 ),,
    "Compares two strings using \"natural order\" case-<b>sensitive</b> comparison.\n"
    "Natural order means that rather than solely comparing single character code values, strings are ordered in a "
    "natural way.  For example, the string \"hello10\" is considered greater than the string \"hello2\" even though "
@@ -325,7 +325,7 @@ DefineConsoleFunction( strnatcmp, S32, ( const char* str1, const char* str2 ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strinatcmp, S32, ( const char* str1, const char* str2 ),,
+DefineEngineFunction( strinatcmp, S32, ( const char* str1, const char* str2 ),,
    "Compares two strings using \"natural order\" case-<b>insensitive</b> comparison.\n"
    "Natural order means that rather than solely comparing single character code values, strings are ordered in a "
    "natural way.  For example, the string \"hello10\" is considered greater than the string \"hello2\" even though "
@@ -360,7 +360,7 @@ DefineConsoleFunction( strinatcmp, S32, ( const char* str1, const char* str2 ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strlen, S32, ( const char* str ),,
+DefineEngineFunction( strlen, S32, ( const char* str ),,
    "Get the length of the given string in bytes.\n"
    "@note This does <b>not</b> return a true character count for strings with multi-byte characters!\n"
    "@param str A string.\n"
@@ -371,7 +371,7 @@ DefineConsoleFunction( strlen, S32, ( const char* str ),,
 }
 
 //-----------------------------------------------------------------------------
-DefineConsoleFunction( strlenskip, S32, ( const char* str, const char* first, const char* last ),,
+DefineEngineFunction( strlenskip, S32, ( const char* str, const char* first, const char* last ),,
    "Calculate the length of a string in characters, skipping everything between and including first and last.\n"
    "@param str A string.\n"
    "@param first First character to look for to skip block of text.\n"
@@ -406,7 +406,7 @@ DefineConsoleFunction( strlenskip, S32, ( const char* str, const char* first, co
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strstr, S32, ( const char* string, const char* substring ),,
+DefineEngineFunction( strstr, S32, ( const char* string, const char* substring ),,
    "Find the start of @a substring in the given @a string searching from left to right.\n"
    "@param string The string to search.\n"
    "@param substring The string to search for.\n"
@@ -425,7 +425,7 @@ DefineConsoleFunction( strstr, S32, ( const char* string, const char* substring
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strpos, S32, ( const char* haystack, const char* needle, S32 offset ), ( 0 ),
+DefineEngineFunction( strpos, S32, ( const char* haystack, const char* needle, S32 offset ), ( 0 ),
    "Find the start of @a needle in @a haystack searching from left to right beginning at the given offset.\n"
    "@param haystack The string to search.\n"
    "@param needle The string to search for.\n"
@@ -450,7 +450,7 @@ DefineConsoleFunction( strpos, S32, ( const char* haystack, const char* needle,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strposr, S32, ( const char* haystack, const char* needle, S32 offset ), ( 0 ),
+DefineEngineFunction( strposr, S32, ( const char* haystack, const char* needle, S32 offset ), ( 0 ),
    "Find the start of @a needle in @a haystack searching from right to left beginning at the given offset.\n"
    "@param haystack The string to search.\n"
    "@param needle The string to search for.\n"
@@ -477,7 +477,7 @@ DefineConsoleFunction( strposr, S32, ( const char* haystack, const char* needle,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( ltrim, const char*, ( const char* str ),,
+DefineEngineFunction( ltrim, const char*, ( const char* str ),,
    "Remove leading whitespace from the string.\n"
    "@param str A string.\n"
    "@return A string that is the same as @a str but with any leading (i.e. leftmost) whitespace removed.\n\n"
@@ -496,7 +496,7 @@ DefineConsoleFunction( ltrim, const char*, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( rtrim, const char*, ( const char* str ),,
+DefineEngineFunction( rtrim, const char*, ( const char* str ),,
    "Remove trailing whitespace from the string.\n"
    "@param str A string.\n"
    "@return A string that is the same as @a str but with any trailing (i.e. rightmost) whitespace removed.\n\n"
@@ -523,7 +523,7 @@ DefineConsoleFunction( rtrim, const char*, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( trim, const char*, ( const char* str ),,
+DefineEngineFunction( trim, const char*, ( const char* str ),,
    "Remove leading and trailing whitespace from the string.\n"
    "@param str A string.\n"
    "@return A string that is the same as @a str but with any leading (i.e. leftmost) and trailing (i.e. rightmost) whitespace removed.\n\n"
@@ -551,7 +551,7 @@ DefineConsoleFunction( trim, const char*, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( stripChars, const char*, ( const char* str, const char* chars ),,
+DefineEngineFunction( stripChars, const char*, ( const char* str, const char* chars ),,
    "Remove all occurrences of characters contained in @a chars from @a str.\n"
    "@param str The string to filter characters out from.\n"
    "@param chars A string of characters to filter out from @a str.\n"
@@ -575,7 +575,7 @@ DefineConsoleFunction( stripChars, const char*, ( const char* str, const char* c
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strlwr, const char*, ( const char* str ),,
+DefineEngineFunction( strlwr, const char*, ( const char* str ),,
    "Return an all lower-case version of the given string.\n"
    "@param str A string.\n"
    "@return A version of @a str with all characters converted to lower-case.\n\n"
@@ -593,7 +593,7 @@ DefineConsoleFunction( strlwr, const char*, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strupr, const char*, ( const char* str ),,
+DefineEngineFunction( strupr, const char*, ( const char* str ),,
    "Return an all upper-case version of the given string.\n"
    "@param str A string.\n"
    "@return A version of @a str with all characters converted to upper-case.\n\n"
@@ -611,7 +611,7 @@ DefineConsoleFunction( strupr, const char*, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strchr, const char*, ( const char* str, const char* chr ),,
+DefineEngineFunction( strchr, const char*, ( const char* str, const char* chr ),,
    "Find the first occurrence of the given character in @a str.\n"
    "@param str The string to search.\n"
    "@param chr The character to search for.  Only the first character from the string is taken.\n"
@@ -625,7 +625,7 @@ DefineConsoleFunction( strchr, const char*, ( const char* str, const char* chr )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strrchr, const char*, ( const char* str, const char* chr ),,
+DefineEngineFunction( strrchr, const char*, ( const char* str, const char* chr ),,
    "Find the last occurrence of the given character in @a str."
    "@param str The string to search.\n"
    "@param chr The character to search for.  Only the first character from the string is taken.\n"
@@ -639,7 +639,7 @@ DefineConsoleFunction( strrchr, const char*, ( const char* str, const char* chr
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strreplace, const char*, ( const char* source, const char* from, const char* to ),,
+DefineEngineFunction( strreplace, const char*, ( const char* source, const char* from, const char* to ),,
    "Replace all occurrences of @a from in @a source with @a to.\n"
    "@param source The string in which to replace the occurrences of @a from.\n"
    "@param from The string to replace in @a source.\n"
@@ -690,7 +690,7 @@ DefineConsoleFunction( strreplace, const char*, ( const char* source, const char
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strrepeat, const char*, ( const char* str, S32 numTimes, const char* delimiter ), ( "" ),
+DefineEngineFunction( strrepeat, const char*, ( const char* str, S32 numTimes, const char* delimiter ), ( "" ),
    "Return a string that repeats @a str @a numTimes number of times delimiting each occurrence with @a delimiter.\n"
    "@param str The string to repeat multiple times.\n"
    "@param numTimes The number of times to repeat @a str in the result string.\n"
@@ -717,7 +717,7 @@ DefineConsoleFunction( strrepeat, const char*, ( const char* str, S32 numTimes,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getSubStr, const char*, ( const char* str, S32 start, S32 numChars ), ( -1 ),
+DefineEngineFunction( getSubStr, const char*, ( const char* str, S32 start, S32 numChars ), ( -1 ),
    "@brief Return a substring of @a str starting at @a start and continuing either through to the end of @a str "
    "(if @a numChars is -1) or for @a numChars characters (except if this would exceed the actual source "
    "string length).\n"
@@ -758,7 +758,7 @@ DefineConsoleFunction( getSubStr, const char*, ( const char* str, S32 start, S32
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strIsMatchExpr, bool, ( const char* pattern, const char* str, bool caseSensitive ), ( false ),
+DefineEngineFunction( strIsMatchExpr, bool, ( const char* pattern, const char* str, bool caseSensitive ), ( false ),
    "Match a pattern against a string.\n"
    "@param pattern The wildcard pattern to match against.  The pattern can include characters, '*' to match "
       "any number of characters and '?' to match a single character.\n"
@@ -777,7 +777,7 @@ DefineConsoleFunction( strIsMatchExpr, bool, ( const char* pattern, const char*
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( strIsMatchMultipleExpr, bool, ( const char* patterns, const char* str, bool caseSensitive ), ( false ),
+DefineEngineFunction( strIsMatchMultipleExpr, bool, ( const char* patterns, const char* str, bool caseSensitive ), ( false ),
    "Match a multiple patterns against a single string.\n"
    "@param patterns A tab-separated list of patterns.  Each pattern can include charaters, '*' to match "
       "any number of characters and '?' to match a single character.  Each of the patterns is tried in turn.\n"
@@ -796,7 +796,7 @@ DefineConsoleFunction( strIsMatchMultipleExpr, bool, ( const char* patterns, con
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getTrailingNumber, S32, ( const char* str ),,
+DefineEngineFunction( getTrailingNumber, S32, ( const char* str ),,
    "Get the numeric suffix of the given input string.\n"
    "@param str The string from which to read out the numeric suffix.\n"
    "@return The numeric value of the number suffix of @a str or -1 if @a str has no such suffix.\n\n"
@@ -813,7 +813,7 @@ DefineConsoleFunction( getTrailingNumber, S32, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( stripTrailingNumber, String, ( const char* str ),,
+DefineEngineFunction( stripTrailingNumber, String, ( const char* str ),,
    "Strip a numeric suffix from the given string.\n"
    "@param str The string from which to strip its numeric suffix.\n"
    "@return The string @a str without its number suffix or the original string @a str if it has no such suffix.\n\n"
@@ -829,7 +829,7 @@ DefineConsoleFunction( stripTrailingNumber, String, ( const char* str ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getFirstNumber, String, ( const char* str ),,
+DefineEngineFunction( getFirstNumber, String, ( const char* str ),,
    "Get the first occuring number from @a str.\n"
    "@param str The string from which to read out the first number.\n"
    "@return String representation of the number or "" if no number.\n\n")
@@ -841,7 +841,7 @@ DefineConsoleFunction( getFirstNumber, String, ( const char* str ),,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( isspace, bool, ( const char* str, S32 index ),,
+DefineEngineFunction( isspace, bool, ( const char* str, S32 index ),,
    "Test whether the character at the given position is a whitespace character.\n"
    "Characters such as tab, space, or newline are considered whitespace.\n"
    "@param str The string to test.\n"
@@ -858,7 +858,7 @@ DefineConsoleFunction( isspace, bool, ( const char* str, S32 index ),,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( isalnum, bool, ( const char* str, S32 index ),,
+DefineEngineFunction( isalnum, bool, ( const char* str, S32 index ),,
    "Test whether the character at the given position is an alpha-numeric character.\n"
    "Alpha-numeric characters are characters that are either alphabetic (a-z, A-Z) or numbers (0-9).\n"
    "@param str The string to test.\n"
@@ -875,7 +875,7 @@ DefineConsoleFunction( isalnum, bool, ( const char* str, S32 index ),,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( startsWith, bool, ( const char* str, const char* prefix, bool caseSensitive ), ( false ),
+DefineEngineFunction( startsWith, bool, ( const char* str, const char* prefix, bool caseSensitive ), ( false ),
    "Test whether the given string begins with the given prefix.\n"
    "@param str The string to test.\n"
    "@param prefix The potential prefix of @a str.\n"
@@ -924,7 +924,7 @@ DefineConsoleFunction( startsWith, bool, ( const char* str, const char* prefix,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( endsWith, bool, ( const char* str, const char* suffix, bool caseSensitive ), ( false ),
+DefineEngineFunction( endsWith, bool, ( const char* str, const char* suffix, bool caseSensitive ), ( false ),
    "@brief Test whether the given string ends with the given suffix.\n\n"
    "@param str The string to test.\n"
    "@param suffix The potential suffix of @a str.\n"
@@ -978,7 +978,7 @@ DefineConsoleFunction( endsWith, bool, ( const char* str, const char* suffix, bo
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( strchrpos, S32, ( const char* str, const char* chr, S32 start ), ( 0 ),
+DefineEngineFunction( strchrpos, S32, ( const char* str, const char* chr, S32 start ), ( 0 ),
    "Find the first occurrence of the given character in the given string.\n"
    "@param str The string to search.\n"
    "@param chr The character to look for.  Only the first character of this string will be searched for.\n"
@@ -998,7 +998,7 @@ DefineConsoleFunction( strchrpos, S32, ( const char* str, const char* chr, S32 s
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( strrchrpos, S32, ( const char* str, const char* chr, S32 start ), ( 0 ),
+DefineEngineFunction( strrchrpos, S32, ( const char* str, const char* chr, S32 start ), ( 0 ),
    "Find the last occurrence of the given character in the given string.\n"
    "@param str The string to search.\n"
    "@param chr The character to look for.  Only the first character of this string will be searched for.\n"
@@ -1025,7 +1025,7 @@ DefineConsoleFunction( strrchrpos, S32, ( const char* str, const char* chr, S32
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction(ColorFloatToInt, ColorI, (LinearColorF color), ,
+DefineEngineFunction(ColorFloatToInt, ColorI, (LinearColorF color), ,
    "Convert from a float color to an integer color (0.0 - 1.0 to 0 to 255).\n"
    "@param color Float color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
    "@return Converted color value (0 - 255)\n\n"
@@ -1037,7 +1037,7 @@ DefineConsoleFunction(ColorFloatToInt, ColorI, (LinearColorF color), ,
    return color.toColorI();
 }
 
-DefineConsoleFunction(ColorIntToFloat, LinearColorF, (ColorI color), ,
+DefineEngineFunction(ColorIntToFloat, LinearColorF, (ColorI color), ,
    "Convert from a integer color to an float color (0 to 255 to 0.0 - 1.0).\n"
    "@param color Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha.\n"
    "@return Converted color value (0.0 - 1.0)\n\n"
@@ -1049,7 +1049,7 @@ DefineConsoleFunction(ColorIntToFloat, LinearColorF, (ColorI color), ,
    return LinearColorF(color);
 }
 
-DefineConsoleFunction(ColorRGBToHEX, const char*, (ColorI color), ,
+DefineEngineFunction(ColorRGBToHEX, const char*, (ColorI color), ,
    "Convert from a integer RGB (red, green, blue) color to hex color value (0 to 255 to 00 - FF).\n"
    "@param color Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. It excepts an alpha, but keep in mind this will not be converted.\n"
    "@return Hex color value (#000000 - #FFFFFF), alpha isn't handled/converted so it is only the RGB value\n\n"
@@ -1061,7 +1061,7 @@ DefineConsoleFunction(ColorRGBToHEX, const char*, (ColorI color), ,
    return Con::getReturnBuffer(color.getHex());
 }
 
-DefineConsoleFunction(ColorRGBToHSB, const char*, (ColorI color), ,
+DefineEngineFunction(ColorRGBToHSB, const char*, (ColorI color), ,
    "Convert from a integer RGB (red, green, blue) color to HSB (hue, saturation, brightness). HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.\n"
    "@param color Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. It excepts an alpha, but keep in mind this will not be converted.\n"
    "@return HSB color value, alpha isn't handled/converted so it is only the RGB value\n\n"
@@ -1075,7 +1075,7 @@ DefineConsoleFunction(ColorRGBToHSB, const char*, (ColorI color), ,
    return Con::getReturnBuffer(s);
 }
 
-DefineConsoleFunction(ColorHEXToRGB, ColorI, (const char* hex), ,
+DefineEngineFunction(ColorHEXToRGB, ColorI, (const char* hex), ,
    "Convert from a hex color value to an integer RGB (red, green, blue) color (00 - FF to 0 to 255).\n"
    "@param hex Hex color value (#000000 - #FFFFFF) to be converted to an RGB (red, green, blue) value.\n"
    "@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
@@ -1089,7 +1089,7 @@ DefineConsoleFunction(ColorHEXToRGB, ColorI, (const char* hex), ,
    return color;
 }
 
-DefineConsoleFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,
+DefineEngineFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,
    "Convert from a HSB (hue, saturation, brightness) to an integer RGB (red, green, blue) color. HSB is also know as HSL or HSV as well, with the last letter standing for lightness or value.\n"
    "@param hsb HSB (hue, saturation, brightness) value to be converted.\n"
    "@return Integer color value to be converted in the form \"R G B A\", where R is red, G is green, B is blue, and A is alpha. Alpha isn't handled/converted so only pay attention to the RGB value\n\n"
@@ -1105,7 +1105,7 @@ DefineConsoleFunction(ColorHSBToRGB, ColorI, (Point3I hsb), ,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( strToggleCaseToWords, const char*, ( const char* str ),,
+DefineEngineFunction( strToggleCaseToWords, const char*, ( const char* str ),,
    "Parse a Toggle Case word into separate words.\n"
    "@param str The string to parse.\n"
    "@return new string space separated.\n\n"
@@ -1130,7 +1130,7 @@ DefineConsoleFunction( strToggleCaseToWords, const char*, ( const char* str ),,
 //----------------------------------------------------------------
 
 // Warning: isInt and isFloat are very 'strict' and might need to be adjusted to allow other values. //seanmc
-DefineConsoleFunction( isInt, bool, ( const char* str),,
+DefineEngineFunction( isInt, bool, ( const char* str),,
    "Returns true if the string is an integer.\n"
    "@param str The string to test.\n"
    "@return true if @a str is an integer and false if not\n\n"
@@ -1144,7 +1144,7 @@ DefineConsoleFunction( isInt, bool, ( const char* str),,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( isFloat, bool, ( const char* str, bool sciOk), (false),
+DefineEngineFunction( isFloat, bool, ( const char* str, bool sciOk), (false),
    "Returns true if the string is a float.\n"
    "@param str The string to test.\n"
    "@param sciOk Test for correct scientific notation and accept it (ex. 1.2e+14)"
@@ -1159,7 +1159,7 @@ DefineConsoleFunction( isFloat, bool, ( const char* str, bool sciOk), (false),
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( isValidPort, bool, ( const char* str),,
+DefineEngineFunction( isValidPort, bool, ( const char* str),,
    "Returns true if the string is a valid port number.\n"
    "@param str The string to test.\n"
    "@return true if @a str is a port and false if not\n\n"
@@ -1179,7 +1179,7 @@ DefineConsoleFunction( isValidPort, bool, ( const char* str),,
 
 //----------------------------------------------------------------
 
-DefineConsoleFunction( isValidIP, bool, ( const char* str),,
+DefineEngineFunction( isValidIP, bool, ( const char* str),,
    "Returns true if the string is a valid ip address, excepts localhost.\n"
    "@param str The string to test.\n"
    "@return true if @a str is a valid ip address and false if not\n\n"
@@ -1200,7 +1200,7 @@ DefineConsoleFunction( isValidIP, bool, ( const char* str),,
 
 // Torque won't normally add another string if it already exists with another casing,
 // so this forces the addition. It should be called once near the start, such as in main.cs.
-ConsoleFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]"
+DefineEngineStringlyVariadicFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]"
                 "Adds case sensitive strings to the StringTable.")
 {
    for(int i = 1; i < argc; i++)
@@ -1214,7 +1214,7 @@ ConsoleFunction(addCaseSensitiveStrings,void,2,0,"[string1, string2, ...]"
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getWord, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( getWord, const char*, ( const char* text, S32 index ),,
    "Extract the word at the given @a index in the whitespace-separated list in @a text.\n"
    "Words in @a text must be separated by newlines, spaces, and/or tabs.\n"
    "@param text A whitespace-separated list of words.\n"
@@ -1235,7 +1235,7 @@ DefineConsoleFunction( getWord, const char*, ( const char* text, S32 index ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getWords, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
+DefineEngineFunction( getWords, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
    "Extract a range of words from the given @a startIndex onwards thru @a endIndex.\n"
    "Words in @a text must be separated by newlines, spaces, and/or tabs.\n"
    "@param text A whitespace-separated list of words.\n"
@@ -1262,7 +1262,7 @@ DefineConsoleFunction( getWords, const char*, ( const char* text, S32 startIndex
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( setWord, const char*, ( const char* text, S32 index, const char* replacement ),,
+DefineEngineFunction( setWord, const char*, ( const char* text, S32 index, const char* replacement ),,
    "Replace the word in @a text at the given @a index with @a replacement.\n"
    "Words in @a text must be separated by newlines, spaces, and/or tabs.\n"
    "@param text A whitespace-separated list of words.\n"
@@ -1284,7 +1284,7 @@ DefineConsoleFunction( setWord, const char*, ( const char* text, S32 index, cons
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( removeWord, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( removeWord, const char*, ( const char* text, S32 index ),,
    "Remove the word in @a text at the given @a index.\n"
    "Words in @a text must be separated by newlines, spaces, and/or tabs.\n"
    "@param text A whitespace-separated list of words.\n"
@@ -1304,7 +1304,7 @@ DefineConsoleFunction( removeWord, const char*, ( const char* text, S32 index ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getWordCount, S32, ( const char* text ),,
+DefineEngineFunction( getWordCount, S32, ( const char* text ),,
    "Return the number of whitespace-separated words in @a text.\n"
    "Words in @a text must be separated by newlines, spaces, and/or tabs.\n"
    "@param text A whitespace-separated list of words.\n"
@@ -1365,7 +1365,7 @@ DefineEngineFunction( weekdayNumToStr, String, ( S32 num, bool abbreviate ), (fa
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getField, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( getField, const char*, ( const char* text, S32 index ),,
    "Extract the field at the given @a index in the newline and/or tab separated list in @a text.\n"
    "Fields in @a text must be separated by newlines and/or tabs.\n"
    "@param text A list of fields separated by newlines and/or tabs.\n"
@@ -1385,7 +1385,7 @@ DefineConsoleFunction( getField, const char*, ( const char* text, S32 index ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getFields, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
+DefineEngineFunction( getFields, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
    "Extract a range of fields from the given @a startIndex onwards thru @a endIndex.\n"
    "Fields in @a text must be separated by newlines and/or tabs.\n"
    "@param text A list of fields separated by newlines and/or tabs.\n"
@@ -1411,7 +1411,7 @@ DefineConsoleFunction( getFields, const char*, ( const char* text, S32 startInde
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( setField, const char*, ( const char* text, S32 index, const char* replacement ),,
+DefineEngineFunction( setField, const char*, ( const char* text, S32 index, const char* replacement ),,
    "Replace the field in @a text at the given @a index with @a replacement.\n"
    "Fields in @a text must be separated by newlines and/or tabs.\n"
    "@param text A list of fields separated by newlines and/or tabs.\n"
@@ -1432,7 +1432,7 @@ DefineConsoleFunction( setField, const char*, ( const char* text, S32 index, con
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( removeField, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( removeField, const char*, ( const char* text, S32 index ),,
    "Remove the field in @a text at the given @a index.\n"
    "Fields in @a text must be separated by newlines and/or tabs.\n"
    "@param text A list of fields separated by newlines and/or tabs.\n"
@@ -1451,7 +1451,7 @@ DefineConsoleFunction( removeField, const char*, ( const char* text, S32 index )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getFieldCount, S32, ( const char* text ),,
+DefineEngineFunction( getFieldCount, S32, ( const char* text ),,
    "Return the number of newline and/or tab separated fields in @a text.\n"
    "@param text A list of fields separated by newlines and/or tabs.\n"
    "@return The number of newline and/or tab sepearated elements in @a text.\n\n"
@@ -1467,7 +1467,7 @@ DefineConsoleFunction( getFieldCount, S32, ( const char* text ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getRecord, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( getRecord, const char*, ( const char* text, S32 index ),,
    "Extract the record at the given @a index in the newline-separated list in @a text.\n"
    "Records in @a text must be separated by newlines.\n"
    "@param text A list of records separated by newlines.\n"
@@ -1487,7 +1487,7 @@ DefineConsoleFunction( getRecord, const char*, ( const char* text, S32 index ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getRecords, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
+DefineEngineFunction( getRecords, const char*, ( const char* text, S32 startIndex, S32 endIndex ), ( -1 ),
    "Extract a range of records from the given @a startIndex onwards thru @a endIndex.\n"
    "Records in @a text must be separated by newlines.\n"
    "@param text A list of records separated by newlines.\n"
@@ -1513,7 +1513,7 @@ DefineConsoleFunction( getRecords, const char*, ( const char* text, S32 startInd
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( setRecord, const char*, ( const char* text, S32 index, const char* replacement ),,
+DefineEngineFunction( setRecord, const char*, ( const char* text, S32 index, const char* replacement ),,
    "Replace the record in @a text at the given @a index with @a replacement.\n"
    "Records in @a text must be separated by newlines.\n"
    "@param text A list of records separated by newlines.\n"
@@ -1534,7 +1534,7 @@ DefineConsoleFunction( setRecord, const char*, ( const char* text, S32 index, co
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( removeRecord, const char*, ( const char* text, S32 index ),,
+DefineEngineFunction( removeRecord, const char*, ( const char* text, S32 index ),,
    "Remove the record in @a text at the given @a index.\n"
    "Records in @a text must be separated by newlines.\n"
    "@param text A list of records separated by newlines.\n"
@@ -1553,7 +1553,7 @@ DefineConsoleFunction( removeRecord, const char*, ( const char* text, S32 index
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getRecordCount, S32, ( const char* text ),,
+DefineEngineFunction( getRecordCount, S32, ( const char* text ),,
    "Return the number of newline-separated records in @a text.\n"
    "@param text A list of records separated by newlines.\n"
    "@return The number of newline-sepearated elements in @a text.\n\n"
@@ -1569,7 +1569,7 @@ DefineConsoleFunction( getRecordCount, S32, ( const char* text ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( firstWord, const char*, ( const char* text ),,
+DefineEngineFunction( firstWord, const char*, ( const char* text ),,
    "Return the first word in @a text.\n"
    "@param text A list of words separated by newlines, spaces, and/or tabs.\n"
    "@return The word at index 0 in @a text or \"\" if @a text is empty.\n\n"
@@ -1585,7 +1585,7 @@ DefineConsoleFunction( firstWord, const char*, ( const char* text ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( restWords, const char*, ( const char* text ),,
+DefineEngineFunction( restWords, const char*, ( const char* text ),,
    "Return all but the first word in @a text.\n"
    "@param text A list of words separated by newlines, spaces, and/or tabs.\n"
    "@return @a text with the first word removed.\n\n"
@@ -1619,7 +1619,7 @@ static bool isInSet(char c, const char *set)
    return false;
 }
 
-DefineConsoleFunction( nextToken, const char*, ( const char* str1, const char* token, const char* delim), , "( string str, string token, string delimiters ) "
+DefineEngineFunction( nextToken, const char*, ( const char* str1, const char* token, const char* delim), , "( string str, string token, string delimiters ) "
    "Tokenize a string using a set of delimiting characters.\n"
    "This function first skips all leading charaters in @a str that are contained in @a delimiters. "
    "From that position, it then scans for the next character in @a str that is contained in @a delimiters and stores all characters "
@@ -1688,7 +1688,7 @@ DefineConsoleFunction( nextToken, const char*, ( const char* str1, const char* t
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getToken, const char*, ( const char* text, const char* delimiters, S32 index ),,
+DefineEngineFunction( getToken, const char*, ( const char* text, const char* delimiters, S32 index ),,
    "Extract the substring at the given @a index in the @a delimiters separated list in @a text.\n"
    "@param text A @a delimiters list of substrings.\n"
    "@param delimiters Character or characters that separate the list of substrings in @a text.\n"
@@ -1709,7 +1709,7 @@ DefineConsoleFunction( getToken, const char*, ( const char* text, const char* de
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getTokens, const char*, ( const char* text, const char* delimiters, S32 startIndex, S32 endIndex ), ( -1 ),
+DefineEngineFunction( getTokens, const char*, ( const char* text, const char* delimiters, S32 startIndex, S32 endIndex ), ( -1 ),
    "Extract a range of substrings separated by @a delimiters at the given @a startIndex onwards thru @a endIndex.\n"
    "@param text A @a delimiters list of substrings.\n"
    "@param delimiters Character or characters that separate the list of substrings in @a text.\n"
@@ -1736,7 +1736,7 @@ DefineConsoleFunction( getTokens, const char*, ( const char* text, const char* d
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( setToken, const char*, ( const char* text, const char* delimiters, S32 index, const char* replacement ),,
+DefineEngineFunction( setToken, const char*, ( const char* text, const char* delimiters, S32 index, const char* replacement ),,
    "Replace the substring in @a text separated by @a delimiters at the given @a index with @a replacement.\n"
    "@param text A @a delimiters list of substrings.\n"
    "@param delimiters Character or characters that separate the list of substrings in @a text.\n"
@@ -1758,7 +1758,7 @@ DefineConsoleFunction( setToken, const char*, ( const char* text, const char* de
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( removeToken, const char*, ( const char* text, const char* delimiters, S32 index ),,
+DefineEngineFunction( removeToken, const char*, ( const char* text, const char* delimiters, S32 index ),,
    "Remove the substring in @a text separated by @a delimiters at the given @a index.\n"
    "@param text A @a delimiters list of substrings.\n"
    "@param delimiters Character or characters that separate the list of substrings in @a text.\n"
@@ -1778,7 +1778,7 @@ DefineConsoleFunction( removeToken, const char*, ( const char* text, const char*
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getTokenCount, S32, ( const char* text, const char* delimiters),,
+DefineEngineFunction( getTokenCount, S32, ( const char* text, const char* delimiters),,
    "Return the number of @a delimiters substrings in @a text.\n"
    "@param text A @a delimiters list of substrings.\n"
    "@param delimiters Character or characters that separate the list of substrings in @a text.\n"
@@ -1837,7 +1837,7 @@ DefineEngineFunction( detag, const char*, ( const char* str ),,
       return str;
 }
 
-DefineConsoleFunction( getTag, const char*, ( const char* textTagString ), , "( string textTagString ) "
+DefineEngineFunction( getTag, const char*, ( const char* textTagString ), , "( string textTagString ) "
    "@brief Extracts the tag from a tagged string\n\n"
 
    "Should only be used within the context of a function that receives a tagged "
@@ -1879,7 +1879,7 @@ DefineConsoleFunction( getTag, const char*, ( const char* textTagString ), , "(
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( echo, void, 2, 0, "( string message... ) "
+DefineEngineStringlyVariadicFunction( echo, void, 2, 0, "( string message... ) "
    "@brief Logs a message to the console.\n\n"
    "Concatenates all given arguments to a single string and prints the string to the console. "
    "A newline is added automatically after the text.\n\n"
@@ -1902,7 +1902,7 @@ ConsoleFunction( echo, void, 2, 0, "( string message... ) "
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( warn, void, 2, 0, "( string message... ) "
+DefineEngineStringlyVariadicFunction( warn, void, 2, 0, "( string message... ) "
    "@brief Logs a warning message to the console.\n\n"
    "Concatenates all given arguments to a single string and prints the string to the console as a warning "
    "message (in the in-game console, these will show up using a turquoise font by default). "
@@ -1926,7 +1926,7 @@ ConsoleFunction( warn, void, 2, 0, "( string message... ) "
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( error, void, 2, 0, "( string message... ) "
+DefineEngineStringlyVariadicFunction( error, void, 2, 0, "( string message... ) "
    "@brief Logs an error message to the console.\n\n"
    "Concatenates all given arguments to a single string and prints the string to the console as an error "
    "message (in the in-game console, these will show up using a red font by default). "
@@ -1968,7 +1968,7 @@ DefineEngineFunction( debugv, void, ( const char* variableName ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( expandEscape, const char*, ( const char* text ),,
+DefineEngineFunction( expandEscape, const char*, ( const char* text ),,
    "@brief Replace all characters in @a text that need to be escaped for the string to be a valid string literal with their "
    "respective escape sequences.\n\n"
    "All characters in @a text that cannot appear in a string literal will be replaced by an escape sequence (\\\\n, \\\\t, etc).\n\n"
@@ -1990,7 +1990,7 @@ DefineConsoleFunction( expandEscape, const char*, ( const char* text ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( collapseEscape, const char*, ( const char* text ),,
+DefineEngineFunction( collapseEscape, const char*, ( const char* text ),,
    "Replace all escape sequences in @a text with their respective character codes.\n\n"
    "This function replaces all escape sequences (\\\\n, \\\\t, etc) in the given string "
    "with the respective characters they represent.\n\n"
@@ -2046,7 +2046,7 @@ DefineEngineFunction( setLogMode, void, ( S32 mode ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( quit, void, ( ),,
+DefineEngineFunction( quit, void, ( ),,
    "Shut down the engine and exit its process.\n"
    "This function cleanly uninitializes the engine and then exits back to the system with a process "
    "exit status indicating a clean exit.\n\n"
@@ -2059,7 +2059,7 @@ DefineConsoleFunction( quit, void, ( ),,
 //-----------------------------------------------------------------------------
 
 
-DefineConsoleFunction( realQuit, void, (), , "")
+DefineEngineFunction( realQuit, void, (), , "")
 {
    Platform::postQuitMessage(0);
 }
@@ -2067,7 +2067,7 @@ DefineConsoleFunction( realQuit, void, (), , "")
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( quitWithErrorMessage, void, ( const char* message, S32 status ), (0),
+DefineEngineFunction( quitWithErrorMessage, void, ( const char* message, S32 status ), (0),
    "Display an error message box showing the given @a message and then shut down the engine and exit its process.\n"
    "This function cleanly uninitialized the engine and then exits back to the system with a process "
    "exit status indicating an error.\n\n"
@@ -2088,7 +2088,7 @@ DefineConsoleFunction( quitWithErrorMessage, void, ( const char* message, S32 st
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( quitWithStatus, void, ( S32 status ), (0),
+DefineEngineFunction( quitWithStatus, void, ( S32 status ), (0),
    "Shut down the engine and exit its process.\n"
    "This function cleanly uninitializes the engine and then exits back to the system with a given "
    "return status code.\n\n"
@@ -2236,7 +2236,7 @@ DefineEngineFunction( generateUUID, Torque::UUID, (),,
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( call, const char *, 2, 0, "( string functionName, string args... ) "
+DefineEngineStringlyVariadicFunction( call, const char *, 2, 0, "( string functionName, string args... ) "
    "Apply the given arguments to the specified global function and return the result of the call.\n\n"
    "@param functionName The name of the function to call.  This function must be in the global namespace, i.e. "
       "you cannot call a function in a namespace through #call.  Use eval() for that.\n"
@@ -2259,7 +2259,7 @@ ConsoleFunction( call, const char *, 2, 0, "( string functionName, string args..
 static U32 execDepth = 0;
 static U32 journalDepth = 1;
 
-DefineConsoleFunction( getDSOPath, const char*, ( const char* scriptFileName ),,
+DefineEngineFunction( getDSOPath, const char*, ( const char* scriptFileName ),,
    "Get the absolute path to the file in which the compiled code for the given script file will be stored.\n"
    "@param scriptFileName %Path to the .cs script file.\n"
    "@return The absolute path to the .dso file for the given script file.\n\n"
@@ -2373,12 +2373,12 @@ DefineEngineFunction( exec, bool, ( const char* fileName, bool noCalls, bool jou
    return Con::executeFile(fileName, noCalls, journalScript);
 }
 
-DefineConsoleFunction( eval, const char*, ( const char* consoleString ), , "eval(consoleString)" )
+DefineEngineFunction( eval, const char*, ( const char* consoleString ), , "eval(consoleString)" )
 {
    return Con::evaluate(consoleString, false, NULL);
 }
 
-DefineConsoleFunction( getVariable, const char*, ( const char* varName ), , "(string varName)\n" 
+DefineEngineFunction( getVariable, const char*, ( const char* varName ), , "(string varName)\n" 
    "@brief Returns the value of the named variable or an empty string if not found.\n\n"
    "@varName Name of the variable to search for\n"
    "@return Value contained by varName, \"\" if the variable does not exist\n"
@@ -2387,7 +2387,7 @@ DefineConsoleFunction( getVariable, const char*, ( const char* varName ), , "(st
    return Con::getVariable(varName);
 }
 
-DefineConsoleFunction( setVariable, void, ( const char* varName, const char* value ), , "(string varName, string value)\n" 
+DefineEngineFunction( setVariable, void, ( const char* varName, const char* value ), , "(string varName, string value)\n" 
    "@brief Sets the value of the named variable.\n\n"
    "@param varName Name of the variable to locate\n"
    "@param value New value of the variable\n"
@@ -2397,7 +2397,7 @@ DefineConsoleFunction( setVariable, void, ( const char* varName, const char* val
    return Con::setVariable(varName, value);
 }
 
-DefineConsoleFunction( isFunction, bool, ( const char* funcName ), , "(string funcName)" 
+DefineEngineFunction( isFunction, bool, ( const char* funcName ), , "(string funcName)" 
    "@brief Determines if a function exists or not\n\n"
    "@param funcName String containing name of the function\n"
    "@return True if the function exists, false if not\n"
@@ -2406,7 +2406,7 @@ DefineConsoleFunction( isFunction, bool, ( const char* funcName ), , "(string fu
    return Con::isFunction(funcName);
 }
 
-DefineConsoleFunction( getFunctionPackage, const char*, ( const char* funcName ), , "(string funcName)" 
+DefineEngineFunction( getFunctionPackage, const char*, ( const char* funcName ), , "(string funcName)" 
    "@brief Provides the name of the package the function belongs to\n\n"
    "@param funcName String containing name of the function\n"
    "@return The name of the function's package\n"
@@ -2419,7 +2419,7 @@ DefineConsoleFunction( getFunctionPackage, const char*, ( const char* funcName )
    return nse->mPackage;
 }
 
-DefineConsoleFunction( isMethod, bool, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" 
+DefineEngineFunction( isMethod, bool, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" 
    "@brief Determines if a class/namespace method exists\n\n"
    "@param namespace Class or namespace, such as Player\n"
    "@param method Name of the function to search for\n"
@@ -2434,7 +2434,7 @@ DefineConsoleFunction( isMethod, bool, ( const char* nameSpace, const char* meth
    return true;
 }
 
-DefineConsoleFunction( getMethodPackage, const char*, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" 
+DefineEngineFunction( getMethodPackage, const char*, ( const char* nameSpace, const char* method ), , "(string namespace, string method)" 
    "@brief Provides the name of the package the method belongs to\n\n"
    "@param namespace Class or namespace, such as Player\n"
    "@param method Name of the funciton to search for\n"
@@ -2452,7 +2452,7 @@ DefineConsoleFunction( getMethodPackage, const char*, ( const char* nameSpace, c
    return nse->mPackage;
 }
 
-DefineConsoleFunction( isDefined, bool, ( const char* varName, const char* varValue ), ("") , "(string varName)" 
+DefineEngineFunction( isDefined, bool, ( const char* varName, const char* varValue ), ("") , "(string varName)" 
    "@brief Determines if a variable exists and contains a value\n"
    "@param varName Name of the variable to search for\n"
    "@return True if the variable was defined in script, false if not\n"
@@ -2590,14 +2590,14 @@ DefineConsoleFunction( isDefined, bool, ( const char* varName, const char* varVa
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( isCurrentScriptToolScript, bool, (), , "()" 
+DefineEngineFunction( isCurrentScriptToolScript, bool, (), , "()" 
    "Returns true if the calling script is a tools script.\n"
    "@hide")
 {
    return Con::isCurrentScriptToolScript();
 }
 
-DefineConsoleFunction( getModNameFromPath, const char *, ( const char* path ), , "(string path)" 
+DefineEngineFunction( getModNameFromPath, const char *, ( const char* path ), , "(string path)" 
             "@brief Attempts to extract a mod directory from path. Returns empty string on failure.\n\n"
             "@param File path of mod folder\n"
             "@note This is no longer relevant in Torque 3D (which does not use mod folders), should be deprecated\n"
@@ -2609,7 +2609,7 @@ DefineConsoleFunction( getModNameFromPath, const char *, ( const char* path ), ,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( pushInstantGroup, void, ( String group ),("") , "([group])" 
+DefineEngineFunction( pushInstantGroup, void, ( String group ),("") , "([group])" 
             "@brief Pushes the current $instantGroup on a stack "
             "and sets it to the given value (or clears it).\n\n"
             "@note Currently only used for editors\n"
@@ -2622,7 +2622,7 @@ DefineConsoleFunction( pushInstantGroup, void, ( String group ),("") , "([group]
       Con::pushInstantGroup();
 }
 
-DefineConsoleFunction( popInstantGroup, void, (), , "()" 
+DefineEngineFunction( popInstantGroup, void, (), , "()" 
             "@brief Pop and restore the last setting of $instantGroup off the stack.\n\n"
             "@note Currently only used for editors\n\n"
             "@ingroup Editors\n"
@@ -2633,7 +2633,7 @@ DefineConsoleFunction( popInstantGroup, void, (), , "()"
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( getPrefsPath, const char *, ( const char* relativeFileName ), (""), "([relativeFileName])" 
+DefineEngineFunction( getPrefsPath, const char *, ( const char* relativeFileName ), (""), "([relativeFileName])" 
             "@note Appears to be useless in Torque 3D, should be deprecated\n"
             "@internal")
 {
@@ -2646,31 +2646,28 @@ DefineConsoleFunction( getPrefsPath, const char *, ( const char* relativeFileNam
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( execPrefs, bool, 2, 4, "( string relativeFileName, bool noCalls=false, bool journalScript=false )"
-            "@brief Manually execute a special script file that contains game or editor preferences\n\n"
-            "@param relativeFileName Name and path to file from project folder\n"
-            "@param noCalls Deprecated\n"
-            "@param journalScript Deprecated\n"
-            "@return True if script was successfully executed\n"
-            "@note Appears to be useless in Torque 3D, should be deprecated\n"
-            "@ingroup Scripting")
+DefineEngineFunction(execPrefs, bool, (const char* relativeFileName, bool noCalls, bool journalScript),(false, false),
+   "@brief Manually execute a special script file that contains game or editor preferences\n\n"
+   "@param relativeFileName Name and path to file from project folder\n"
+   "@param noCalls Deprecated\n"
+   "@param journalScript Deprecated\n"
+   "@return True if script was successfully executed\n"
+   "@note Appears to be useless in Torque 3D, should be deprecated\n"
+   "@ingroup Scripting")
 {
-   const char *filename = Platform::getPrefsPath(argv[1]);
-   if(filename == NULL || *filename == 0)
+   if (relativeFileName == NULL || *relativeFileName == 0)
       return false;
 
    // Scripts do this a lot, so we may as well help them out
-   if(! Platform::isFile(filename) && ! Torque::FS::IsFile(filename))
+   if (!Platform::isFile(relativeFileName) && !Torque::FS::IsFile(relativeFileName))
       return true;
 
-   argv[0] = "exec";
-   argv[1] = filename;
-   return dAtob(Con::execute(argc, argv));
+   return Con::executeFile(relativeFileName, noCalls, journalScript);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( export, void, ( const char* pattern, const char* filename, bool append ), ( "", false ),
+DefineEngineFunction( export, void, ( const char* pattern, const char* filename, bool append ), ( "", false ),
    "Write out the definitions of all global variables matching the given name @a pattern.\n"
    "If @a fileName is not \"\", the variable definitions are written to the specified file.  Otherwise the "
    "definitions will be printed to the console.\n\n"
@@ -2723,7 +2720,7 @@ DefineEngineFunction( deleteVariables, void, ( const char* pattern ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( trace, void, ( bool enable ), ( true ),
+DefineEngineFunction( trace, void, ( bool enable ), ( true ),
    "Enable or disable tracing in the script code VM.\n\n"
    "When enabled, the script code runtime will trace the invocation and returns "
    "from all functions that are called and log them to the console. This is helpful in "
@@ -2739,7 +2736,7 @@ DefineConsoleFunction( trace, void, ( bool enable ), ( true ),
 
 #if defined(TORQUE_DEBUG) || !defined(TORQUE_SHIPPING)
 
-DefineConsoleFunction( debug, void, (),,
+DefineEngineFunction( debug, void, (),,
    "Drops the engine into the native C++ debugger.\n\n"
    "This function triggers a debug break and drops the process into the IDE's debugger.  If the process is not "
    "running with a debugger attached it will generate a runtime error on most platforms.\n\n"

+ 2 - 2
Engine/source/console/consoleLogger.cpp

@@ -225,7 +225,7 @@ void ConsoleLogger::log( const char *consoleLine )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( ConsoleLogger, attach, bool, (), , "() Attaches the logger to the console and begins writing to file"
+DefineEngineMethod( ConsoleLogger, attach, bool, (), , "() Attaches the logger to the console and begins writing to file"
            "@tsexample\n"
            "// Create the logger\n"
            "// Will automatically start writing to testLogging.txt with normal priority\n"
@@ -247,7 +247,7 @@ DefineConsoleMethod( ConsoleLogger, attach, bool, (), , "() Attaches the logger
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( ConsoleLogger, detach, bool, (), , "() Detaches the logger from the console and stops writing to file"
+DefineEngineMethod( ConsoleLogger, detach, bool, (), , "() Detaches the logger from the console and stops writing to file"
            "@tsexample\n"
            "// Create the logger\n"
            "// Will automatically start writing to testLogging.txt with normal priority\n"

+ 1 - 1
Engine/source/console/consoleXMLExport.cpp

@@ -314,7 +314,7 @@ namespace Con {
 }; // namespace Con
 
 
-DefineConsoleFunction( consoleExportXML, const char*, (), ,"Exports console definition XML representation" )
+DefineEngineFunction( consoleExportXML, const char*, (), ,"Exports console definition XML representation" )
 {
    Con::XMLExport xmlExport;
    String xml;

+ 52 - 66
Engine/source/console/engineAPI.h

@@ -855,76 +855,62 @@ public:
       );                                                                                                                               \
    static inline returnType _fn ## className ## name ## impl args
 
-
-// Convenience macros to allow defining functions that use the new marshalling features
-// while being only visible in the console interop.  When we drop the console system,
-// these macros can be removed and all definitions that make use of them can be removed
-// as well.
-#define DefineConsoleFunction( name, returnType, args, defaultArgs, usage )                                                      \
-   static inline returnType _fn ## name ## impl args;                                                                            \
-   static _EngineFunctionDefaultArguments< void args > _fn ## name ## DefaultArgs defaultArgs;                                   \
-   static _EngineConsoleThunkType< returnType >::ReturnType _ ## name ## caster( SimObject*, S32 argc, ConsoleValueRef *argv )       \
+#  define DefineEngineStringlyVariadicFunction(name,returnType,minArgs,maxArgs,usage) \
+   static inline returnType _fn ## name ## impl (SimObject *, S32 argc, ConsoleValueRef *argv);                                  \
+   TORQUE_API EngineTypeTraits< returnType >::ReturnValueType fn ## name                                                         \
+      (S32 argc, const char** argv)                                                                                              \
    {                                                                                                                             \
-      return _EngineConsoleThunkType< returnType >::ReturnType( _EngineConsoleThunk< 1, returnType args >::thunk(                \
-         argc, argv, &_fn ## name ## impl, _fn ## name ## DefaultArgs                                                            \
-      ) );                                                                                                                       \
-   }                                                                                                                             \
-   static ConsoleFunctionHeader _ ## name ## header                                                                              \
-      ( #returnType, #args, #defaultArgs );                                                                                      \
-   static ConsoleConstructor                                                                                                     \
-      _ ## name ## obj( NULL, #name, _EngineConsoleThunkType< returnType >::CallbackType( _ ## name ## caster ), usage,          \
-         _EngineConsoleThunk< 1, returnType args >::NUM_ARGS - _EngineConsoleThunkCountArgs() defaultArgs,                       \
-         _EngineConsoleThunk< 1, returnType args >::NUM_ARGS,                                                                    \
-         false, &_ ## name ## header                                                                                             \
+      _CHECK_ENGINE_INITIALIZED( name, returnType );                                                                             \
+      StringStackConsoleWrapper args(argc, argv);                                                                                \
+      return EngineTypeTraits< returnType >::ReturnValue(                                                                        \
+         _fn ## name ## impl(NULL, args.count(), args)                                                                           \
       );                                                                                                                         \
-   static inline returnType _fn ## name ## impl args
+   }                                                                                                                             \
+   static _EngineFunctionDefaultArguments< void (S32 argc, const char** argv) > _fn ## name ## DefaultArgs;                      \
+   static EngineFunctionInfo _fn ## name ## FunctionInfo(                                                                        \
+      #name,                                                                                                                     \
+      &_SCOPE<>()(),                                                                                                             \
+      usage,                                                                                                                     \
+      #returnType " " #name "(S32 argc, const char** argv)",                                                                     \
+      "fn" #name,                                                                                                                \
+      TYPE< returnType (S32 argc, const char** argv) >(),                                                                        \
+      &_fn ## name ## DefaultArgs,                                                                                               \
+      ( void* ) &fn ## name,                                                                                                     \
+      0                                                                                                                          \
+   );                                                                                                                            \
+   ConsoleConstructor cc_##name##_obj(NULL,#name,_fn ## name ## impl,usage,minArgs,maxArgs); \
+      returnType _fn ## name ## impl(SimObject *, S32 argc, ConsoleValueRef *argv)
 
-#define DefineConsoleMethod( className, name, returnType, args, defaultArgs, usage )                                                            \
-   struct _ ## className ## name ## frame                                                                                                       \
-   {                                                                                                                                            \
-      typedef className ObjectType;                                                                                                             \
-      className* object;                                                                                                                        \
-      inline returnType _exec args const;                                                                                                       \
-   };                                                                                                                                           \
-   static _EngineFunctionDefaultArguments< _EngineMethodTrampoline< _ ## className ## name ## frame, void args >::FunctionType >                \
-      _fn ## className ## name ## DefaultArgs defaultArgs;                                                                                      \
-   static _EngineConsoleThunkType< returnType >::ReturnType _ ## className ## name ## caster( SimObject* object, S32 argc, ConsoleValueRef *argv )  \
-   {                                                                                                                                            \
-      _ ## className ## name ## frame frame;                                                                                                    \
-      frame.object = static_cast< className* >( object );                                                                                       \
-      return _EngineConsoleThunkType< returnType >::ReturnType( _EngineConsoleThunk< 2, returnType args >::thunk(                               \
-         argc, argv, &_ ## className ## name ## frame::_exec, &frame, _fn ## className ## name ## DefaultArgs                                   \
-      ) );                                                                                                                                      \
-   }                                                                                                                                            \
-   static ConsoleFunctionHeader _ ## className ## name ## header                                                                                \
-      ( #returnType, #args, #defaultArgs );                                                                                                     \
-   static ConsoleConstructor                                                                                                                    \
-      className ## name ## obj( #className, #name,                                                                                              \
-         _EngineConsoleThunkType< returnType >::CallbackType( _ ## className ## name ## caster ), usage,                                        \
-         _EngineConsoleThunk< 2, returnType args >::NUM_ARGS - _EngineConsoleThunkCountArgs() defaultArgs,                                      \
-         _EngineConsoleThunk< 2, returnType args >::NUM_ARGS,                                                                                   \
-         false, &_ ## className ## name ## header                                                                                               \
-      );                                                                                                                                        \
-   returnType _ ## className ## name ## frame::_exec args const
+#  define DefineEngineStringlyVariadicMethod(className, name,returnType,minArgs,maxArgs,usage)                                   \
+   static inline returnType _fn ## className ## _ ## name ## impl (className* object, S32 argc, ConsoleValueRef* argv);          \
+   TORQUE_API EngineTypeTraits< returnType >::ReturnValueType fn ## className ## _ ## name                                       \
+      (className* object, S32 argc, const char** argv)                                                                           \
+   {                                                                                                                             \
+      _CHECK_ENGINE_INITIALIZED( name, returnType );                                                                             \
+      StringStackConsoleWrapper args(argc, argv);                                                                                \
+      return EngineTypeTraits< returnType >::ReturnValue(                                                                        \
+         _fn ## className ## _ ## name ## impl(object, args.count(), args)                                                       \
+      );                                                                                                                         \
+   }                                                                                                                             \
+   static _EngineFunctionDefaultArguments< void (className* object, S32 argc, const char** argv) > _fn ## className ## _ ## name ## DefaultArgs;   \
+   static EngineFunctionInfo _fn ## className ## _ ## name ## FunctionInfo(                                                      \
+      #name,                                                                                                                     \
+      &_SCOPE<>()(),                                                                                                             \
+      usage,                                                                                                                     \
+      #returnType " " #name "(SimObject* object, S32 argc, const char** argv)",                                                  \
+      "fn" #className "_" #name,                                                                                                 \
+      TYPE< returnType (SimObject* object, S32 argc, const char** argv) >(),                                                     \
+      &_fn ## className ## _ ## name ## DefaultArgs,                                                                             \
+      ( void* ) &fn ## className ## _ ## name,                                                                                   \
+      0                                                                                                                          \
+   );                                                                                                                            \
+   returnType cm_##className##_##name##_caster(SimObject* object, S32 argc, ConsoleValueRef* argv) {                             \
+      AssertFatal( dynamic_cast<className*>( object ), "Object passed to " #name " is not a " #className "!" );                  \
+      conmethod_return_##returnType ) _fn ## className ## _ ## name ## impl(static_cast<className*>(object),argc,argv);          \
+   };                                                                                                                            \
+   ConsoleConstructor cc_##className##_##name##_obj(#className,#name,cm_##className##_##name##_caster,usage,minArgs,maxArgs);    \
+   static inline returnType _fn ## className ## _ ## name ## impl(className *object, S32 argc, ConsoleValueRef *argv)
 
-#define DefineConsoleStaticMethod( className, name, returnType, args, defaultArgs, usage )                                             \
-   static inline returnType _fn ## className ## name ## impl args;                                                                     \
-   static _EngineFunctionDefaultArguments< void args > _fn ## className ## name ## DefaultArgs defaultArgs;                            \
-   static _EngineConsoleThunkType< returnType >::ReturnType _ ## className ## name ## caster( SimObject*, S32 argc, ConsoleValueRef *argv )\
-   {                                                                                                                                   \
-      return _EngineConsoleThunkType< returnType >::ReturnType( _EngineConsoleThunk< 1, returnType args >::thunk(                      \
-         argc, argv, &_fn ## className ## name ## impl, _fn ## className ## name ## DefaultArgs                                        \
-      ) );                                                                                                                             \
-   }                                                                                                                                   \
-   static ConsoleFunctionHeader _ ## className ## name ## header                                                                       \
-      ( #returnType, #args, #defaultArgs, true );                                                                                      \
-   static ConsoleConstructor                                                                                                           \
-      _ ## className ## name ## obj( #className, #name, _EngineConsoleThunkType< returnType >::CallbackType( _ ## className ## name ## caster ), usage, \
-         _EngineConsoleThunk< 1, returnType args >::NUM_ARGS - _EngineConsoleThunkCountArgs() defaultArgs,                             \
-         _EngineConsoleThunk< 1, returnType args >::NUM_ARGS,                                                                          \
-         false, &_ ## className ## name ## header                                                                                      \
-      );                                                                                                                               \
-   static inline returnType _fn ## className ## name ## impl args
 
 
 // The following three macros are only temporary.  They allow to define engineAPI functions using the framework

+ 4 - 4
Engine/source/console/fieldBrushObject.cpp

@@ -123,7 +123,7 @@ static char* suppressSpaces(const char* in_pname)
 //-----------------------------------------------------------------------------
 // Query Groups.
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* simObjName), , "(simObject) Query available static-field groups for selected object./\n"
+DefineEngineMethod(FieldBrushObject, queryGroups, const char*, (const char* simObjName), , "(simObject) Query available static-field groups for selected object./\n"
                                                                 "@param simObject Object to query static-field groups on.\n"
                                                              "@return Space-seperated static-field group list.")
 {
@@ -191,7 +191,7 @@ DefineConsoleMethod(FieldBrushObject, queryGroups, const char*, (const char* sim
 //-----------------------------------------------------------------------------
 // Query Fields.
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* simObjName, const char* groupList), (""), "(simObject, [groupList]) Query available static-fields for selected object./\n"
+DefineEngineMethod(FieldBrushObject, queryFields, const char*, (const char* simObjName, const char* groupList), (""), "(simObject, [groupList]) Query available static-fields for selected object./\n"
                                                                 "@param simObject Object to query static-fields on.\n"
                                                                 "@param groupList groups to filter static-fields against.\n"
                                                              "@return Space-seperated static-field list.")
@@ -366,7 +366,7 @@ DefineConsoleMethod(FieldBrushObject, queryFields, const char*, (const char* sim
 //-----------------------------------------------------------------------------
 // Copy Fields.
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(FieldBrushObject, copyFields, void, (const char* simObjName, const char* pFieldList), (""), "(simObject, [fieldList]) Copy selected static-fields for selected object./\n"
+DefineEngineMethod(FieldBrushObject, copyFields, void, (const char* simObjName, const char* pFieldList), (""), "(simObject, [fieldList]) Copy selected static-fields for selected object./\n"
                                                         "@param simObject Object to copy static-fields from.\n"
                                                         "@param fieldList fields to filter static-fields against.\n"
                                                      "@return No return value.")
@@ -500,7 +500,7 @@ void FieldBrushObject::copyFields( SimObject* pSimObject, const char* fieldList
 //-----------------------------------------------------------------------------
 // Paste Fields.
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(FieldBrushObject, pasteFields, void, (const char* simObjName), , "(simObject) Paste copied static-fields to selected object./\n"
+DefineEngineMethod(FieldBrushObject, pasteFields, void, (const char* simObjName), , "(simObject) Paste copied static-fields to selected object./\n"
                                                         "@param simObject Object to paste static-fields to.\n"
                                                      "@return No return value.")
 {

+ 13 - 13
Engine/source/console/persistenceManager.cpp

@@ -2190,14 +2190,14 @@ void PersistenceManager::deleteObjectsFromFile(const char* fileName)
    clearAll();
 }
 
-DefineConsoleMethod( PersistenceManager, deleteObjectsFromFile, void, ( const char * fileName ), , "( fileName )"
+DefineEngineMethod( PersistenceManager, deleteObjectsFromFile, void, ( const char * fileName ), , "( fileName )"
               "Delete all of the objects that are created from the given file." )
 {
    // Delete Objects.
    object->deleteObjectsFromFile( fileName );
 }
 
-DefineConsoleMethod( PersistenceManager, setDirty, void,  ( const char * objName, const char * fileName ), (""), "(SimObject object, [filename])"
+DefineEngineMethod( PersistenceManager, setDirty, void,  ( const char * objName, const char * fileName ), (""), "(SimObject object, [filename])"
               "Mark an existing SimObject as dirty (will be written out when saveDirty() is called).")
 {
    SimObject *dirtyObject = NULL;
@@ -2226,7 +2226,7 @@ DefineConsoleMethod( PersistenceManager, setDirty, void,  ( const char * objName
    }
 }
 
-DefineConsoleMethod( PersistenceManager, removeDirty, void, ( const char * objName ), , "(SimObject object)"
+DefineEngineMethod( PersistenceManager, removeDirty, void, ( const char * objName ), , "(SimObject object)"
               "Remove a SimObject from the dirty list.")
 {
    SimObject *dirtyObject = NULL;
@@ -2243,7 +2243,7 @@ DefineConsoleMethod( PersistenceManager, removeDirty, void, ( const char * objNa
       object->removeDirty(dirtyObject);
 }
 
-DefineConsoleMethod( PersistenceManager, isDirty, bool, ( const char * objName ), , "(SimObject object)"
+DefineEngineMethod( PersistenceManager, isDirty, bool, ( const char * objName ), , "(SimObject object)"
               "Returns true if the SimObject is on the dirty list.")
 {
    SimObject *dirtyObject = NULL;
@@ -2262,19 +2262,19 @@ DefineConsoleMethod( PersistenceManager, isDirty, bool, ( const char * objName )
    return false;
 }
 
-DefineConsoleMethod( PersistenceManager, hasDirty, bool, (), , "()"
+DefineEngineMethod( PersistenceManager, hasDirty, bool, (), , "()"
               "Returns true if the manager has dirty objects to save." )
 {
    return object->hasDirty();
 }
 
-DefineConsoleMethod( PersistenceManager, getDirtyObjectCount, S32, (), , "()"
+DefineEngineMethod( PersistenceManager, getDirtyObjectCount, S32, (), , "()"
               "Returns the number of dirty objects." )
 {
    return object->getDirtyList().size();
 }
 
-DefineConsoleMethod( PersistenceManager, getDirtyObject, S32, (S32 index), , "( index )"
+DefineEngineMethod( PersistenceManager, getDirtyObject, S32, (S32 index), , "( index )"
               "Returns the ith dirty object." )
 {
    if ( index < 0 || index >= object->getDirtyList().size() )
@@ -2290,7 +2290,7 @@ DefineConsoleMethod( PersistenceManager, getDirtyObject, S32, (S32 index), , "(
    return ( dirtyObject.getObject() ) ? dirtyObject.getObject()->getId() : 0;
 }
 
-DefineConsoleMethod( PersistenceManager, listDirty, void, (), , "()"
+DefineEngineMethod( PersistenceManager, listDirty, void, (), , "()"
               "Prints the dirty list to the console.")
 {
    const PersistenceManager::DirtyList dirtyList = object->getDirtyList();
@@ -2318,13 +2318,13 @@ DefineConsoleMethod( PersistenceManager, listDirty, void, (), , "()"
    }
 }
 
-DefineConsoleMethod( PersistenceManager, saveDirty, bool, (), , "()"
+DefineEngineMethod( PersistenceManager, saveDirty, bool, (), , "()"
               "Saves all of the SimObject's on the dirty list to their respective files.")
 {
    return object->saveDirty();
 }
 
-DefineConsoleMethod( PersistenceManager, saveDirtyObject, bool, (const char * objName), , "(SimObject object)"
+DefineEngineMethod( PersistenceManager, saveDirtyObject, bool, (const char * objName), , "(SimObject object)"
               "Save a dirty SimObject to it's file.")
 {
    SimObject *dirtyObject = NULL;
@@ -2342,13 +2342,13 @@ DefineConsoleMethod( PersistenceManager, saveDirtyObject, bool, (const char * ob
    return false;
 }
 
-DefineConsoleMethod( PersistenceManager, clearAll, void, (), , "()"
+DefineEngineMethod( PersistenceManager, clearAll, void, (), , "()"
               "Clears all the tracked objects without saving them." )
 {
    object->clearAll();
 }
 
-DefineConsoleMethod( PersistenceManager, removeObjectFromFile, void, (const char * objName, const char * filename),("") , "(SimObject object, [filename])"
+DefineEngineMethod( PersistenceManager, removeObjectFromFile, void, (const char * objName, const char * filename),("") , "(SimObject object, [filename])"
               "Remove an existing SimObject from a file (can optionally specify a different file than \
                the one it was created in.")
 {
@@ -2371,7 +2371,7 @@ DefineConsoleMethod( PersistenceManager, removeObjectFromFile, void, (const char
    }
 }
 
-DefineConsoleMethod( PersistenceManager, removeField, void, (const char * objName, const char * fieldName), , "(SimObject object, string fieldName)"
+DefineEngineMethod( PersistenceManager, removeField, void, (const char * objName, const char * fieldName), , "(SimObject object, string fieldName)"
               "Remove a specific field from an object declaration.")
 {
    SimObject *dirtyObject = NULL;

+ 14 - 16
Engine/source/console/scriptFilename.cpp

@@ -27,7 +27,7 @@
 #include "core/tSimpleHashTable.h"
 #include "core/strings/stringFunctions.h"
 #include "core/stringTable.h"
-#include "console/console.h"
+#include "console/engineAPI.h"
 #include "console/compiler.h"
 
 
@@ -342,28 +342,26 @@ bool collapseScriptFilename(char *filename, U32 size, const char *src)
 // Console Functions
 //-----------------------------------------------------------------------------
 
-ConsoleFunction(expandFilename, const char*, 2, 2, "(string filename)"
-            "@brief Grabs the full path of a specified file\n\n"
-            "@param filename Name of the local file to locate\n"
-            "@return String containing the full filepath on disk\n"
-            "@ingroup FileSystem")
+DefineEngineFunction(expandFilename, const char*, (const char* filename),,
+   "@brief Grabs the full path of a specified file\n\n"
+   "@param filename Name of the local file to locate\n"
+   "@return String containing the full filepath on disk\n"
+   "@ingroup FileSystem")
 {
-   TORQUE_UNUSED(argc);
    static const U32 bufSize = 1024;
-   char* ret = Con::getReturnBuffer( bufSize );
-   Con::expandScriptFilename(ret, bufSize, argv[1]);
+   char* ret = Con::getReturnBuffer(bufSize);
+   Con::expandScriptFilename(ret, bufSize, filename);
    return ret;
 }
 
-ConsoleFunction(expandOldFilename, const char*, 2, 2, "(string filename)"
-            "@brief Retrofits a filepath that uses old Torque style\n\n"
-            "@return String containing filepath with new formatting\n"
-            "@ingroup FileSystem")
+DefineEngineFunction(expandOldFilename, const char*, (const char* filename),,
+   "@brief Retrofits a filepath that uses old Torque style\n\n"
+   "@return String containing filepath with new formatting\n"
+   "@ingroup FileSystem")
 {
-   TORQUE_UNUSED(argc);
    static const U32 bufSize = 1024;
-   char* ret = Con::getReturnBuffer( bufSize );
-   Con::expandOldScriptFilename(ret, bufSize, argv[1]);
+   char* ret = Con::getReturnBuffer(bufSize);
+   Con::expandOldScriptFilename(ret, bufSize, filename);
    return ret;
 }
 

+ 13 - 13
Engine/source/console/sim.cpp

@@ -86,7 +86,7 @@ namespace Sim
 
 ConsoleFunctionGroupBegin ( SimFunctions, "Functions relating to Sim.");
 
-DefineConsoleFunction( nameToID, S32, (const char * objectName), ,"nameToID(object)")
+DefineEngineFunction( nameToID, S32, (const char * objectName), ,"nameToID(object)")
 {
    SimObject *obj = Sim::findObject(objectName);
    if(obj)
@@ -95,7 +95,7 @@ DefineConsoleFunction( nameToID, S32, (const char * objectName), ,"nameToID(obje
       return -1;
 }
 
-DefineConsoleFunction( isObject, bool, (const char * objectName), ,"isObject(object)")
+DefineEngineFunction( isObject, bool, (const char * objectName), ,"isObject(object)")
 {
    if (!dStrcmp(objectName, "0") || !dStrcmp(objectName, ""))
       return false;
@@ -133,7 +133,7 @@ ConsoleDocFragment _spawnObject1(
    "bool spawnObject(class [, dataBlock, name, properties, script]);"
 );
 
-DefineConsoleFunction( spawnObject, S32, (   const char * spawnClass
+DefineEngineFunction( spawnObject, S32, (   const char * spawnClass
                                          ,   const char * spawnDataBlock
                                          ,   const char * spawnName
                                          ,   const char * spawnProperties
@@ -149,39 +149,39 @@ DefineConsoleFunction( spawnObject, S32, (   const char * spawnClass
       return -1;
 }
 
-DefineConsoleFunction( cancel, void, (S32 eventId), ,"cancel(eventId)")
+DefineEngineFunction( cancel, void, (S32 eventId), ,"cancel(eventId)")
 {
    Sim::cancelEvent(eventId);
 }
 
-DefineConsoleFunction( cancelAll, void, (const char * objectId), ,"cancelAll(objectId): cancel pending events on the specified object.  Events will be automatically cancelled if object is deleted.")
+DefineEngineFunction( cancelAll, void, (const char * objectId), ,"cancelAll(objectId): cancel pending events on the specified object.  Events will be automatically cancelled if object is deleted.")
 {
    Sim::cancelPendingEvents(Sim::findObject(objectId));
 }
 
-DefineConsoleFunction( isEventPending, bool, (S32 scheduleId), ,"isEventPending(%scheduleId);")
+DefineEngineFunction( isEventPending, bool, (S32 scheduleId), ,"isEventPending(%scheduleId);")
 {
    return Sim::isEventPending(scheduleId);
 }
 
-DefineConsoleFunction( getEventTimeLeft, S32, (S32 scheduleId), ,"getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger.")
+DefineEngineFunction( getEventTimeLeft, S32, (S32 scheduleId), ,"getEventTimeLeft(scheduleId) Get the time left in ms until this event will trigger.")
 {
    return Sim::getEventTimeLeft(scheduleId);
 }
 
-DefineConsoleFunction( getScheduleDuration, S32, (S32 scheduleId), ,"getScheduleDuration(%scheduleId);" )
+DefineEngineFunction( getScheduleDuration, S32, (S32 scheduleId), ,"getScheduleDuration(%scheduleId);" )
 {
    S32 ret = Sim::getScheduleDuration(scheduleId);
    return ret;
 }
 
-DefineConsoleFunction( getTimeSinceStart, S32, (S32 scheduleId), ,"getTimeSinceStart(%scheduleId);" )
+DefineEngineFunction( getTimeSinceStart, S32, (S32 scheduleId), ,"getTimeSinceStart(%scheduleId);" )
 {
    S32 ret = Sim::getTimeSinceStart(scheduleId);
    return ret;
 }
 
-ConsoleFunction(schedule, S32, 4, 0, "schedule(time, refobject|0, command, <arg1...argN>)")
+DefineEngineStringlyVariadicFunction(schedule, S32, 4, 0, "schedule(time, refobject|0, command, <arg1...argN>)")
 {
    U32 timeDelta = U32(dAtof(argv[1]));
    SimObject *refObject = Sim::findObject(argv[2]);
@@ -202,7 +202,7 @@ ConsoleFunction(schedule, S32, 4, 0, "schedule(time, refobject|0, command, <arg1
    return ret;
 }
 
-DefineConsoleFunction( getUniqueName, const char*, (const char * baseName), ,
+DefineEngineFunction( getUniqueName, const char*, (const char * baseName), ,
    "( String baseName )\n"
    "@brief Returns a unique unused SimObject name based on a given base name.\n\n"
    "@baseName Name to conver to a unique string if another instance exists\n"
@@ -221,7 +221,7 @@ DefineConsoleFunction( getUniqueName, const char*, (const char * baseName), ,
    return buffer;
 }
 
-DefineConsoleFunction( getUniqueInternalName, const char*, (const char * baseName, const char * setString, bool searchChildren), ,
+DefineEngineFunction( getUniqueInternalName, const char*, (const char * baseName, const char * setString, bool searchChildren), ,
    "( String baseName, SimSet set, bool searchChildren )\n"
    "@brief Returns a unique unused internal name within the SimSet/Group based on a given base name.\n\n"
    "@note Currently only used by editors\n"
@@ -246,7 +246,7 @@ DefineConsoleFunction( getUniqueInternalName, const char*, (const char * baseNam
    return buffer;
 }
 
-DefineConsoleFunction( isValidObjectName, bool, (const char * name), , "( string name )"
+DefineEngineFunction( isValidObjectName, bool, (const char * name), , "( string name )"
             "@brief Return true if the given name makes for a valid object name.\n\n"
             "@param name Name of object\n"
             "@return True if name is allowed, false if denied (usually because it starts with a number, _, or invalid character"

+ 3 - 3
Engine/source/console/simDatablock.cpp

@@ -428,7 +428,7 @@ void SimDataBlock::write(Stream &stream, U32 tabStop, U32 flags)
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimDataBlock, reloadOnLocalClient, void, (),,
+DefineEngineMethod( SimDataBlock, reloadOnLocalClient, void, (),,
    "Reload the datablock.  This can only be used with a local client configuration." )
 {
    // Make sure we're running a local client.
@@ -464,7 +464,7 @@ DefineConsoleMethod( SimDataBlock, reloadOnLocalClient, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( preloadClientDataBlocks, void, (),,
+DefineEngineFunction( preloadClientDataBlocks, void, (),,
    "Preload all datablocks in client mode.\n\n"
    "(Server parameter is set to false).  This will take some time to complete.")
 {
@@ -482,7 +482,7 @@ DefineConsoleFunction( preloadClientDataBlocks, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleFunction( deleteDataBlocks, void, (),,
+DefineEngineFunction( deleteDataBlocks, void, (),,
    "Delete all the datablocks we've downloaded.\n\n"
    "This is usually done in preparation of downloading a new set of datablocks, "
    "such as occurs on a mission change, but it's also good post-mission cleanup." )

+ 31 - 31
Engine/source/console/simObject.cpp

@@ -2271,7 +2271,7 @@ DefineEngineMethod( SimObject, dumpGroupHierarchy, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, isMethod, bool, ( const char* methodName ),,
+DefineEngineMethod( SimObject, isMethod, bool, ( const char* methodName ),,
    "Test whether the given method is defined on this object.\n"
    "@param The name of the method.\n"
    "@return True if the object implements the given method." )
@@ -2291,7 +2291,7 @@ DefineEngineMethod( SimObject, isChildOfGroup, bool, ( SimGroup* group ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getClassNamespace, const char*, (),,
+DefineEngineMethod( SimObject, getClassNamespace, const char*, (),,
    "Get the name of the class namespace assigned to this object.\n"
    "@return The name of the 'class' namespace." )
 {
@@ -2300,7 +2300,7 @@ DefineConsoleMethod( SimObject, getClassNamespace, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getSuperClassNamespace, const char*, (),,
+DefineEngineMethod( SimObject, getSuperClassNamespace, const char*, (),,
    "Get the name of the superclass namespace assigned to this object.\n"
    "@return The name of the 'superClass' namespace." )
 {
@@ -2309,7 +2309,7 @@ DefineConsoleMethod( SimObject, getSuperClassNamespace, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setClassNamespace, void, ( const char* name ),,
+DefineEngineMethod( SimObject, setClassNamespace, void, ( const char* name ),,
    "Assign a class namespace to this object.\n"
    "@param name The name of the 'class' namespace for this object." )
 {
@@ -2318,7 +2318,7 @@ DefineConsoleMethod( SimObject, setClassNamespace, void, ( const char* name ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setSuperClassNamespace, void, ( const char* name ),,
+DefineEngineMethod( SimObject, setSuperClassNamespace, void, ( const char* name ),,
    "Assign a superclass namespace to this object.\n"
    "@param name The name of the 'superClass' namespace for this object." )
 {
@@ -2345,7 +2345,7 @@ DefineEngineMethod( SimObject, setIsSelected, void, ( bool state ), ( true ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, isExpanded, bool, (),,
+DefineEngineMethod( SimObject, isExpanded, bool, (),,
    "Get whether the object has been marked as expanded. (in editor)\n"
    "@return True if the object is marked expanded." )
 {
@@ -2354,7 +2354,7 @@ DefineConsoleMethod( SimObject, isExpanded, bool, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setIsExpanded, void, ( bool state ), ( true ),
+DefineEngineMethod( SimObject, setIsExpanded, void, ( bool state ), ( true ),
    "Set whether the object has been marked as expanded. (in editor)\n"
    "@param state True if the object is to be marked expanded; false if not." )
 {
@@ -2363,7 +2363,7 @@ DefineConsoleMethod( SimObject, setIsExpanded, void, ( bool state ), ( true ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getFilename, const char*, (),,
+DefineEngineMethod( SimObject, getFilename, const char*, (),,
    "Returns the filename the object is attached to.\n"
    "@return The name of the file the object is associated with; usually the file the object was loaded from." )
 {
@@ -2372,7 +2372,7 @@ DefineConsoleMethod( SimObject, getFilename, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setFilename, void, ( const char* fileName ),,
+DefineEngineMethod( SimObject, setFilename, void, ( const char* fileName ),,
    "Sets the object's file name and path\n"
    "@param fileName The name of the file to associate this object with." )
 {
@@ -2381,7 +2381,7 @@ DefineConsoleMethod( SimObject, setFilename, void, ( const char* fileName ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getDeclarationLine, S32, (),,
+DefineEngineMethod( SimObject, getDeclarationLine, S32, (),,
    "Get the line number at which the object is defined in its file.\n\n"
    "@return The line number of the object's definition in script.\n"
    "@see getFilename()")
@@ -2418,7 +2418,7 @@ DefineEngineFunction( debugEnumInstances, void, ( const char* className, const c
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, assignFieldsFrom, void, ( SimObject* fromObject ),,
+DefineEngineMethod( SimObject, assignFieldsFrom, void, ( SimObject* fromObject ),,
    "Copy fields from another object onto this one.  The objects must "
    "be of same type. Everything from the object will overwrite what's "
    "in this object; extra fields in this object will remain. This "
@@ -2439,7 +2439,7 @@ DefineEngineMethod( SimObject, assignPersistentId, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getCanSave, bool, (),,
+DefineEngineMethod( SimObject, getCanSave, bool, (),,
    "Get whether the object will be included in saves.\n"
    "@return True if the object will be saved; false otherwise." )
 {
@@ -2448,7 +2448,7 @@ DefineConsoleMethod( SimObject, getCanSave, bool, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setCanSave, void, ( bool value ), ( true ),
+DefineEngineMethod( SimObject, setCanSave, void, ( bool value ), ( true ),
    "Set whether the object will be included in saves.\n"
    "@param value If true, the object will be included in saves; if false, it will be excluded." )
 {
@@ -2529,7 +2529,7 @@ DefineEngineMethod( SimObject, setHidden, void, ( bool value ), ( true ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, dumpMethods, ArrayObject*, (),,
+DefineEngineMethod( SimObject, dumpMethods, ArrayObject*, (),,
    "List the methods defined on this object.\n\n"
    "Each description is a newline-separated vector with the following elements:\n"
    "- Minimum number of arguments.\n"
@@ -2776,7 +2776,7 @@ DefineEngineMethod( SimObject, dump, void, ( bool detailed ), ( false ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, save, bool, ( const char* fileName, bool selectedOnly, const char* preAppendString ), ( false, "" ),
+DefineEngineMethod( SimObject, save, bool, ( const char* fileName, bool selectedOnly, const char* preAppendString ), ( false, "" ),
    "Save out the object to the given file.\n"
    "@param fileName The name of the file to save to."
    "@param selectedOnly If true, only objects marked as selected will be saved out.\n"
@@ -2808,7 +2808,7 @@ DefineEngineMethod( SimObject, getName, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getClassName, const char*, (),,
+DefineEngineMethod( SimObject, getClassName, const char*, (),,
    "Get the name of the C++ class which the object is an instance of.\n"
    "@return The name of the C++ class of the object." )
 {
@@ -2818,7 +2818,7 @@ DefineConsoleMethod( SimObject, getClassName, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, isField, bool, ( const char* fieldName ),,
+DefineEngineMethod( SimObject, isField, bool, ( const char* fieldName ),,
    "Test whether the given field is defined on this object.\n"
    "@param fieldName The name of the field.\n"
    "@return True if the object implements the given field." )
@@ -2828,7 +2828,7 @@ DefineConsoleMethod( SimObject, isField, bool, ( const char* fieldName ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getFieldValue, const char*, ( const char* fieldName, S32 index ), ( -1 ),
+DefineEngineMethod( SimObject, getFieldValue, const char*, ( const char* fieldName, S32 index ), ( -1 ),
    "Return the value of the given field on this object.\n"
    "@param fieldName The name of the field.  If it includes a field index, the index is parsed out.\n"
    "@param index Optional parameter to specify the index of an array field separately.\n"
@@ -2872,7 +2872,7 @@ DefineConsoleMethod( SimObject, getFieldValue, const char*, ( const char* fieldN
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setFieldValue, bool, ( const char* fieldName, const char* value, S32 index ), ( -1 ),
+DefineEngineMethod( SimObject, setFieldValue, bool, ( const char* fieldName, const char* value, S32 index ), ( -1 ),
    "Set the value of the given field on this object.\n"
    "@param fieldName The name of the field to assign to.  If it includes an array index, the index will be parsed out.\n"
    "@param value The new value to assign to the field.\n"
@@ -2919,7 +2919,7 @@ DefineConsoleMethod( SimObject, setFieldValue, bool, ( const char* fieldName, co
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getFieldType, const char*, ( const char* fieldName ),,
+DefineEngineMethod( SimObject, getFieldType, const char*, ( const char* fieldName ),,
    "Get the console type code of the given field.\n"
    "@return The numeric type code for the underlying console type of the given field." )
 {
@@ -2934,7 +2934,7 @@ DefineConsoleMethod( SimObject, getFieldType, const char*, ( const char* fieldNa
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, setFieldType, void, ( const char* fieldName, const char* type ),,
+DefineEngineMethod( SimObject, setFieldType, void, ( const char* fieldName, const char* type ),,
    "Set the console type code for the given field.\n"
    "@param fieldName The name of the dynamic field to change to type for.\n"
    "@param type The name of the console type.\n"
@@ -2945,7 +2945,7 @@ DefineConsoleMethod( SimObject, setFieldType, void, ( const char* fieldName, con
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod( SimObject, call, const char*, 3, 0, "( string method, string args... ) Dynamically call a method on an object.\n"
+DefineEngineStringlyVariadicMethod( SimObject, call, const char*, 3, 0, "( string method, string args... ) Dynamically call a method on an object.\n"
    "@param method Name of method to call.\n"
    "@param args Zero or more arguments for the method.\n"
    "@return The result of the method call." )
@@ -2974,7 +2974,7 @@ DefineEngineMethod( SimObject, getInternalName, const char*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, dumpClassHierarchy, void, (),,
+DefineEngineMethod( SimObject, dumpClassHierarchy, void, (),,
    "Dump the native C++ class hierarchy of this object's C++ class to the console." )
 {
    object->dumpClassHierarchy();
@@ -2982,7 +2982,7 @@ DefineConsoleMethod( SimObject, dumpClassHierarchy, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, isMemberOfClass, bool, ( const char* className ),,
+DefineEngineMethod( SimObject, isMemberOfClass, bool, ( const char* className ),,
    "Test whether this object is a member of the specified class.\n"
    "@param className Name of a native C++ class.\n"
    "@return True if this object is an instance of the given C++ class or any of its super classes." )
@@ -3004,7 +3004,7 @@ DefineConsoleMethod( SimObject, isMemberOfClass, bool, ( const char* className )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, isInNamespaceHierarchy, bool, ( const char* name ),,
+DefineEngineMethod( SimObject, isInNamespaceHierarchy, bool, ( const char* name ),,
    "Test whether the namespace of this object is a direct or indirect child to the given namespace.\n"
    "@param name The name of a namespace.\n"
    "@return True if the given namespace name is within the namespace hierarchy of this object." )
@@ -3039,7 +3039,7 @@ DefineEngineMethod( SimObject, getGroup, SimGroup*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, delete, void, (),,
+DefineEngineMethod( SimObject, delete, void, (),,
    "Delete and remove the object." )
 {
    object->deleteObject();
@@ -3047,7 +3047,7 @@ DefineConsoleMethod( SimObject, delete, void, (),,
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod( SimObject,schedule, S32, 4, 0, "( float time, string method, string args... ) Delay an invocation of a method.\n"
+DefineEngineStringlyVariadicMethod( SimObject,schedule, S32, 4, 0, "( float time, string method, string args... ) Delay an invocation of a method.\n"
    "@param time The number of milliseconds after which to invoke the method.  This is a soft limit.\n"
    "@param method The method to call.\n"
    "@param args The arguments with which to call the method.\n"
@@ -3067,7 +3067,7 @@ ConsoleMethod( SimObject,schedule, S32, 4, 0, "( float time, string method, stri
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getDynamicFieldCount, S32, (),,
+DefineEngineMethod( SimObject, getDynamicFieldCount, S32, (),,
    "Get the number of dynamic fields defined on the object.\n"
    "@return The number of dynamic fields defined on the object." )
 {
@@ -3081,7 +3081,7 @@ DefineConsoleMethod( SimObject, getDynamicFieldCount, S32, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getDynamicField, const char*, ( S32 index ),,
+DefineEngineMethod( SimObject, getDynamicField, const char*, ( S32 index ),,
    "Get a value of a dynamic field by index.\n"
    "@param index The index of the dynamic field.\n"
    "@return The value of the dynamic field at the given index or \"\"." )
@@ -3113,7 +3113,7 @@ DefineConsoleMethod( SimObject, getDynamicField, const char*, ( S32 index ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getFieldCount, S32, (),,
+DefineEngineMethod( SimObject, getFieldCount, S32, (),,
    "Get the number of static fields on the object.\n"
    "@return The number of static fields defined on the object." )
 {
@@ -3135,7 +3135,7 @@ DefineConsoleMethod( SimObject, getFieldCount, S32, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimObject, getField, const char*, ( S32 index ),,
+DefineEngineMethod( SimObject, getField, const char*, ( S32 index ),,
    "Retrieve the value of a static field by index.\n"
    "@param index The index of the static field.\n"
    "@return The value of the static field with the given index or \"\"." )

+ 1 - 1
Engine/source/console/simPersistSet.cpp

@@ -187,7 +187,7 @@ void SimPersistSet::addObject( SimObject* object )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimPersistSet, resolvePersistentIds, void, (), , "() - Try to bind unresolved persistent IDs in the set." )
+DefineEngineMethod( SimPersistSet, resolvePersistentIds, void, (), , "() - Try to bind unresolved persistent IDs in the set." )
 {
    object->resolvePIDs();
 }

+ 7 - 23
Engine/source/console/simSet.cpp

@@ -895,15 +895,7 @@ DefineEngineMethod( SimSet, listObjects, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DEFINE_CALLIN( fnSimSet_add, add, SimSet, void, ( SimSet* set, SimObject* object ),,,
-   "Add the given object to the set.\n"
-   "@param object An object." )
-{
-   if( object )
-      set->addObject( object );
-}
-
-ConsoleMethod( SimSet, add, void, 3, 0,
+DefineEngineStringlyVariadicMethod( SimSet, add, void, 3, 0,
    "( SimObject objects... ) Add the given objects to the set.\n"
    "@param objects The objects to add to the set." )
 {
@@ -919,15 +911,7 @@ ConsoleMethod( SimSet, add, void, 3, 0,
 
 //-----------------------------------------------------------------------------
 
-DEFINE_CALLIN( fnSimSet_remove, remove, SimSet, void, ( SimSet* set, SimObject* object ),,,
-   "Remove the given object from the set.\n"
-   "@param object An object." )
-{
-   if( object )
-      set->removeObject( object );
-}
-
-ConsoleMethod( SimSet, remove, void, 3, 0,
+DefineEngineStringlyVariadicMethod( SimSet, remove, void, 3, 0,
    "( SimObject objects... ) Remove the given objects from the set.\n"
    "@param objects The objects to remove from the set." )
 {
@@ -954,7 +938,7 @@ DefineEngineMethod( SimSet, clear, void, (),,
 //-----------------------------------------------------------------------------
 
 //UNSAFE; don't want this in the new API
-DefineConsoleMethod( SimSet, deleteAllObjects, void, (), , "() Delete all objects in the set." )
+DefineEngineMethod( SimSet, deleteAllObjects, void, (), , "() Delete all objects in the set." )
 {
    object->deleteAllObjects();
 }
@@ -970,7 +954,7 @@ DefineEngineMethod( SimSet, getRandom, SimObject*, (),,
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod( SimSet, callOnChildren, void, 3, 0,
+DefineEngineStringlyVariadicMethod( SimSet, callOnChildren, void, 3, 0,
    "( string method, string args... ) Call a method on all objects contained in the set.\n\n"
    "@param method The name of the method to call.\n"
    "@param args The arguments to the method.\n\n"
@@ -982,7 +966,7 @@ ConsoleMethod( SimSet, callOnChildren, void, 3, 0,
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod( SimSet, callOnChildrenNoRecurse, void, 3, 0,
+DefineEngineStringlyVariadicMethod( SimSet, callOnChildrenNoRecurse, void, 3, 0,
    "( string method, string args... ) Call a method on all objects contained in the set.\n\n"
    "@param method The name of the method to call.\n"
    "@param args The arguments to the method.\n\n"
@@ -1026,7 +1010,7 @@ DEFINE_CALLIN( fnSimSet_getCountRecursive, getCountRecursive, SimSet, U32, ( Sim
    return set->sizeRecursive();
 }
 
-DefineConsoleMethod( SimSet, getFullCount, S32, (), , "() Get the number of direct and indirect child objects contained in the set.\n"
+DefineEngineMethod( SimSet, getFullCount, S32, (), , "() Get the number of direct and indirect child objects contained in the set.\n"
    "@return The number of objects contained in the set as well as in other sets contained directly or indirectly in the set." )
 {
    return object->sizeRecursive();
@@ -1122,7 +1106,7 @@ DefineEngineMethod( SimSet, pushToBack, void, ( SimObject* obj ),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( SimSet, sort, void, ( const char * callbackFunction ), , "( string callbackFunction ) Sort the objects in the set using the given comparison function.\n"
+DefineEngineMethod( SimSet, sort, void, ( const char * callbackFunction ), , "( string callbackFunction ) Sort the objects in the set using the given comparison function.\n"
    "@param callbackFunction Name of a function that takes two object arguments A and B and returns -1 if A is less, 1 if B is less, and 0 if both are equal." )
 {
    object->scriptSort( callbackFunction );

+ 1 - 1
Engine/source/console/telnetConsole.cpp

@@ -61,7 +61,7 @@ void TelnetConsole::destroy()
    TelConsole = NULL;
 }
 
-DefineConsoleFunction( telnetSetParameters, void, ( int port, const char* consolePass, const char* listenPass, bool remoteEcho ), ( false ),
+DefineEngineFunction( telnetSetParameters, void, ( int port, const char* consolePass, const char* listenPass, bool remoteEcho ), ( false ),
                 "@brief Initializes and open the telnet console.\n\n"
                 "@param port        Port to listen on for console connections (0 will shut down listening).\n"
                 "@param consolePass Password for read/write access to console.\n"

+ 3 - 3
Engine/source/console/telnetDebugger.cpp

@@ -113,7 +113,7 @@ MODULE_END;
 // BRKCLR file line - sent when a breakpoint cannot be moved to a breakable line on the client.
 //
 
-DefineConsoleFunction( dbgSetParameters, void, (S32 port, const char * password, bool waitForClient ), (false), "( int port, string password, bool waitForClient )"
+DefineEngineFunction( dbgSetParameters, void, (S32 port, const char * password, bool waitForClient ), (false), "( int port, string password, bool waitForClient )"
                 "Open a debug server port on the specified port, requiring the specified password, "
             "and optionally waiting for the debug client to connect.\n"
             "@internal Primarily used for Torsion and other debugging tools")
@@ -124,14 +124,14 @@ DefineConsoleFunction( dbgSetParameters, void, (S32 port, const char * password,
    }
 }
 
-DefineConsoleFunction( dbgIsConnected, bool, (), , "()"
+DefineEngineFunction( dbgIsConnected, bool, (), , "()"
                 "Returns true if a script debugging client is connected else return false.\n"
             "@internal Primarily used for Torsion and other debugging tools")
 {
    return TelDebugger && TelDebugger->isConnected();
 }
 
-DefineConsoleFunction( dbgDisconnect, void, (), , "()"
+DefineEngineFunction( dbgDisconnect, void, (), , "()"
                 "Forcibly disconnects any attached script debugging client.\n"
             "@internal Primarily used for Torsion and other debugging tools")
 {

+ 23 - 36
Engine/source/core/color.cpp

@@ -536,80 +536,67 @@ float LinearColorF::sSrgbToLinear[256] =
 #endif
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( getStockColorCount, S32, 1, 1, "() - Gets a count of available stock colors.\n"
-   "@return A count of available stock colors." )
+DefineEngineFunction(getStockColorCount, S32, (),,
+   "@brief Gets a count of available stock colors.\n"
+   "@return A count of available stock colors.")
 {
    return StockColor::getCount();
 }
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( getStockColorName, const char*, 2, 2,  "(stockColorIndex) - Gets the stock color name at the specified index.\n"
+DefineEngineFunction(getStockColorName, const char*, (S32 stockColorIndex),,
+   "@brief Gets the stock color name at the specified index.\n"
    "@param stockColorIndex The zero-based index of the stock color name to retrieve.\n"
-   "@return The stock color name at the specified index or nothing if the string is invalid." )
+   "@return The stock color name at the specified index or nothing if the string is invalid.")
 {
-   // Fetch stock color index.
-   const S32 stockColorIndex = dAtoi(argv[1]);
-
    // Fetch the color item.
-   const StockColorItem* pColorItem = StockColor::getColorItem( stockColorIndex );
+   const StockColorItem* pColorItem = StockColor::getColorItem(stockColorIndex);
 
    return pColorItem == NULL ? NULL : pColorItem->getColorName();
 }
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( isStockColor, bool, 2, 2,  "(stockColorName) - Gets whether the specified name is a stock color or not.\n"
+DefineEngineFunction(isStockColor, bool, (const char* stockColorName),,
+   "@brief Gets whether the specified name is a stock color or not.\n"
    "@param stockColorName - The stock color name to test for.\n"
-   "@return Whether the specified name is a stock color or not.\n" )
+   "@return Whether the specified name is a stock color or not.\n")
 {
-   // Fetch stock color name.
-   const char* pStockColorName = argv[1];
-
    // Return whether this is a stock color name or not.
-   return StockColor::isColor( pStockColorName );
+   return StockColor::isColor(stockColorName);
 }
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( getStockColorF, const char*, 2, 2, "(stockColorName) - Gets a floating-point-based stock color by name.\n"
+DefineEngineFunction(getStockColorF, LinearColorF, (const char* stockColorName),,
+   "@brief Gets a floating-point-based stock color by name.\n"
    "@param stockColorName - The stock color name to retrieve.\n"
-   "@return The stock color that matches the specified color name.  Returns nothing if the color name is not found.\n" )
+   "@return The stock color that matches the specified color name.  Returns nothing if the color name is not found.\n")
 {
-   // Fetch stock color name.
-   const char* pStockColorName = argv[1];
-
    // Return nothing if stock color name is invalid.
-   if ( !StockColor::isColor( pStockColorName ) )
+   if (!StockColor::isColor(stockColorName))
       return StringTable->EmptyString();
 
    // Fetch stock color.
-   const LinearColorF& color = StockColor::colorF( pStockColorName );
+   const LinearColorF& color = StockColor::colorF(stockColorName);
 
-   // Format stock color.
-   char* returnBuffer = Con::getReturnBuffer(256);
-   dSprintf(returnBuffer, 256, "%g %g %g %g", color.red, color.green, color.blue, color.alpha);
-   return(returnBuffer);
+   return color;
 }
 
 //-----------------------------------------------------------------------------
 
-ConsoleFunction( getStockColorI, const char*, 2, 2, "(stockColorName) - Gets a byte-based stock color by name.\n"
+DefineEngineFunction(getStockColorI, ColorI, (const char* stockColorName),,
+   "@brief Gets a byte-based stock color by name.\n"
    "@param stockColorName - The stock color name to retrieve.\n"
-   "@return The stock color that matches the specified color name.  Returns nothing if the color name is not found.\n" )
+   "@return The stock color that matches the specified color name.  Returns nothing if the color name is not found.\n")
 {
-   // Fetch stock color name.
-   const char* pStockColorName = argv[1];
-
    // Return nothing if stock color name is invalid.
-   if ( !StockColor::isColor( pStockColorName ) )
+   if (!StockColor::isColor(stockColorName))
       return StringTable->EmptyString();
 
    // Fetch stock color.
-   const ColorI& color = StockColor::colorI( pStockColorName );
+   const ColorI& color = StockColor::colorI(stockColorName);
 
-   // Format stock color.
-   char* returnBuffer = Con::getReturnBuffer(256);
-   dSprintf(returnBuffer, 256, "%d %d %d %d", color.red, color.green, color.blue, color.alpha);
-   return(returnBuffer);
+   return color;
 }

+ 1 - 1
Engine/source/core/dnet.cpp

@@ -50,7 +50,7 @@ static const char *packetTypeNames[] =
 //-----------------------------------------------------------------
 //-----------------------------------------------------------------
 //-----------------------------------------------------------------
-DefineConsoleFunction( DNetSetLogging, void, (bool enabled), , "(bool enabled)"
+DefineEngineFunction( DNetSetLogging, void, (bool enabled), , "(bool enabled)"
    "@brief Enables logging of the connection protocols\n\n"
    "When enabled a lot of network debugging information is sent to the console.\n"
    "@param enabled True to enable, false to disable\n"

+ 1 - 1
Engine/source/core/fileObject.cpp

@@ -484,7 +484,7 @@ static ConsoleDocFragment _FileObjectwriteObject2(
    "FileObject",
    "void writeObject( SimObject* object, string prepend);");
 
-DefineConsoleMethod( FileObject, writeObject, void,  (const char * simName, const char * objName), (""), "FileObject.writeObject(SimObject, object prepend)" 
+DefineEngineMethod( FileObject, writeObject, void,  (const char * simName, const char * objName), (""), "FileObject.writeObject(SimObject, object prepend)"
 			  "@hide")
 {
    SimObject* obj = Sim::findObject( simName );

+ 2 - 2
Engine/source/core/frameAllocator.cpp

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "core/frameAllocator.h"
-#include "console/console.h"
+#include "console/engineAPI.h"
 
 U8*   FrameAllocator::smBuffer = NULL;
 U32   FrameAllocator::smWaterMark = 0;
@@ -30,7 +30,7 @@ U32   FrameAllocator::smHighWaterMark = 0;
 #ifdef TORQUE_DEBUG
 U32   FrameAllocator::smMaxFrameAllocation = 0;
 
-ConsoleFunction(getMaxFrameAllocation, S32, 1,1, "getMaxFrameAllocation();")
+DefineEngineFunction(getMaxFrameAllocation, S32, (),,"")
 {
    return FrameAllocator::getMaxFrameAllocation();
 }

+ 5 - 6
Engine/source/core/resourceManager.cpp

@@ -222,18 +222,17 @@ ResourceBase ResourceManager::nextResource()
 ConsoleFunctionGroupBegin(ResourceManagerFunctions, "Resource management functions.");
 
 
-ConsoleFunction(resourceDump, void, 1, 1, "()"
-				"@brief List the currently managed resources\n\n"
-				"Currently used by editors only, internal\n"
-				"@ingroup Editors\n"
-				"@internal")
+DefineEngineFunction(resourceDump, void, (),,
+   "@brief List the currently managed resources\n\n"
+   "Currently used by editors only, internal\n"
+   "@ingroup Editors\n"
+   "@internal")
 {
 #ifdef TORQUE_DEBUG
    ResourceManager::get().dumpToConsole();
 #endif
 }
 
-
 DefineEngineFunction( reloadResource, void, ( const char* path ),,
    "Force the resource at specified input path to be reloaded\n"
    "@param path Path to the resource to be reloaded\n\n"

+ 2 - 2
Engine/source/core/stringBuffer.cpp

@@ -48,12 +48,12 @@
          void dumpAllStrings();
    };
 
-   DefineConsoleFunction( sbmDumpStats, void, (), , "()")
+   DefineEngineFunction( sbmDumpStats, void, (), , "()")
    {
       StringBufferManager::getManager().dumpStats();
    }
 
-   DefineConsoleFunction( sbmDumpStrings, void, (), , "()")
+   DefineEngineFunction( sbmDumpStrings, void, (), , "()")
    {
       StringBufferManager::getManager().dumpAllStrings();
    }

+ 1 - 1
Engine/source/core/util/str.cpp

@@ -480,7 +480,7 @@ static U32 sgStringInstances;
 
 
 #endif
-DefineConsoleFunction( dumpStringMemStats, void, (), , "()"
+DefineEngineFunction( dumpStringMemStats, void, (), , "()"
 				"@brief Dumps information about String memory usage\n\n"
 				"@ingroup Debugging\n"
 				"@ingroup Strings\n")

+ 1 - 1
Engine/source/environment/VolumetricFogRTManager.cpp

@@ -283,7 +283,7 @@ VolumetricFogRTManager* VolumetricFogRTManager::get()
    return gVolumetricFogRTManager;
 }
    
-DefineConsoleFunction(SetFogVolumeQuality, S32, (U32 new_quality), ,
+DefineEngineFunction(SetFogVolumeQuality, S32, (U32 new_quality), ,
 "@brief Resizes the rendertargets of the Volumetric Fog object.\n"
 "@params new_quality new quality for the rendertargets 1 = full size, 2 = halfsize, 3 = 1/3, 4 = 1/4 ...")
 {

+ 15 - 15
Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp

@@ -1185,67 +1185,67 @@ void GuiMeshRoadEditorCtrl::matchTerrainToRoad()
    // with the terrain underneath it.
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, deleteNode, void, (), , "deleteNode()" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, deleteNode, void, (), , "deleteNode()" )
 {
    object->deleteSelectedNode();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getMode, const char*, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getMode, const char*, (), , "" )
 {
    return object->getMode();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setMode, void, (const char * mode), , "setMode( String mode )" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setMode, void, (const char * mode), , "setMode( String mode )" )
 {
    String newMode = ( mode );
    object->setMode( newMode );
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getNodeWidth, F32, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getNodeWidth, F32, (), , "" )
 {
    return object->getNodeWidth();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
 {
    object->setNodeWidth( width );
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getNodeDepth, F32, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getNodeDepth, F32, (), , "" )
 {
    return object->getNodeDepth();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setNodeDepth, void, ( F32 depth ), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setNodeDepth, void, ( F32 depth ), , "" )
 {
    object->setNodeDepth( depth );
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getNodePosition, Point3F, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getNodePosition, Point3F, (), , "" )
 {
 
 	return object->getNodePosition();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setNodePosition, void, (Point3F pos), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setNodePosition, void, (Point3F pos), , "" )
 {
 
    object->setNodePosition( pos );
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getNodeNormal, Point3F, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getNodeNormal, Point3F, (), , "" )
 {
 
 	return object->getNodeNormal();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setNodeNormal, void, (Point3F normal), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setNodeNormal, void, (Point3F normal), , "" )
 {
 
    object->setNodeNormal( normal );
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, setSelectedRoad, void, (const char * objName), (""), "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, setSelectedRoad, void, (const char * objName), (""), "" )
 {
    if ( String::isEmpty(objName) )
       object->setSelectedRoad(NULL);
@@ -1257,7 +1257,7 @@ DefineConsoleMethod( GuiMeshRoadEditorCtrl, setSelectedRoad, void, (const char *
    }
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
 {
    MeshRoad *road = object->getSelectedRoad();
    if ( !road )
@@ -1266,14 +1266,14 @@ DefineConsoleMethod( GuiMeshRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
    return road->getId();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, regenerate, void, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, regenerate, void, (), , "" )
 {
    MeshRoad *road = object->getSelectedRoad();
    if ( road )
       road->regenerate();
 }
 
-DefineConsoleMethod( GuiMeshRoadEditorCtrl, matchTerrainToRoad, void, (), , "" )
+DefineEngineMethod( GuiMeshRoadEditorCtrl, matchTerrainToRoad, void, (), , "" )
 {
    object->matchTerrainToRoad();
 }

+ 14 - 14
Engine/source/environment/editors/guiRiverEditorCtrl.cpp

@@ -1393,66 +1393,66 @@ void GuiRiverEditorCtrl::_renderSelectedRiver( ObjectRenderInst *ri, SceneRender
    }
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, deleteNode, void, (), , "deleteNode()" )
+DefineEngineMethod( GuiRiverEditorCtrl, deleteNode, void, (), , "deleteNode()" )
 {
    object->deleteSelectedNode();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getMode, const char*, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getMode, const char*, (), , "" )
 {
    return object->getMode();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setMode, void, ( const char * mode ), , "setMode( String mode )" )
+DefineEngineMethod( GuiRiverEditorCtrl, setMode, void, ( const char * mode ), , "setMode( String mode )" )
 {
    String newMode = ( mode );
    object->setMode( newMode );
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getNodeWidth, F32, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getNodeWidth, F32, (), , "" )
 {
    return object->getNodeWidth();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
 {
    object->setNodeWidth( width );
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getNodeDepth, F32, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getNodeDepth, F32, (), , "" )
 {
    return object->getNodeDepth();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setNodeDepth, void, ( F32 depth ), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, setNodeDepth, void, ( F32 depth ), , "" )
 {
    object->setNodeDepth( depth );
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getNodePosition, Point3F, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getNodePosition, Point3F, (), , "" )
 {
 
 	return  object->getNodePosition();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setNodePosition, void, (Point3F pos), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, setNodePosition, void, (Point3F pos), , "" )
 {
    object->setNodePosition( pos );
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getNodeNormal, Point3F, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getNodeNormal, Point3F, (), , "" )
 {
 
 	return object->getNodeNormal();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setNodeNormal, void, (Point3F normal), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, setNodeNormal, void, (Point3F normal), , "" )
 {
 
    object->setNodeNormal( normal );
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, setSelectedRiver, void, (const char * objName), (""), "" )
+DefineEngineMethod( GuiRiverEditorCtrl, setSelectedRiver, void, (const char * objName), (""), "" )
 {
    if (dStrcmp( objName,"" )==0)
       object->setSelectedRiver(NULL);
@@ -1464,7 +1464,7 @@ DefineConsoleMethod( GuiRiverEditorCtrl, setSelectedRiver, void, (const char * o
    }
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, getSelectedRiver, S32, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, getSelectedRiver, S32, (), , "" )
 {
    River *river = object->getSelectedRiver();
    if ( !river )
@@ -1473,7 +1473,7 @@ DefineConsoleMethod( GuiRiverEditorCtrl, getSelectedRiver, S32, (), , "" )
    return river->getId();
 }
 
-DefineConsoleMethod( GuiRiverEditorCtrl, regenerate, void, (), , "" )
+DefineEngineMethod( GuiRiverEditorCtrl, regenerate, void, (), , "" )
 {
    River *river = object->getSelectedRiver();
    if ( river )

+ 11 - 11
Engine/source/environment/editors/guiRoadEditorCtrl.cpp

@@ -1037,45 +1037,45 @@ void GuiRoadEditorCtrl::submitUndo( const UTF8 *name )
    undoMan->addAction( action );
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, deleteNode, void, (), , "deleteNode()" )
+DefineEngineMethod( GuiRoadEditorCtrl, deleteNode, void, (), , "deleteNode()" )
 {
    object->deleteSelectedNode();
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, getMode, const char*, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, getMode, const char*, (), , "" )
 {
    return object->getMode();
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, setMode, void, ( const char * mode ), , "setMode( String mode )" )
+DefineEngineMethod( GuiRoadEditorCtrl, setMode, void, ( const char * mode ), , "setMode( String mode )" )
 {
    String newMode = ( mode );
    object->setMode( newMode );
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, getNodeWidth, F32, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, getNodeWidth, F32, (), , "" )
 {
    return object->getNodeWidth();
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, setNodeWidth, void, ( F32 width ), , "" )
 {
    object->setNodeWidth( width );
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, getNodePosition, Point3F, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, getNodePosition, Point3F, (), , "" )
 {
 
 	return object->getNodePosition();
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, setNodePosition, void, ( Point3F pos ), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, setNodePosition, void, ( Point3F pos ), , "" )
 {
 
    object->setNodePosition( pos );
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, setSelectedRoad, void, ( const char * pathRoad ), (""), "" )
+DefineEngineMethod( GuiRoadEditorCtrl, setSelectedRoad, void, ( const char * pathRoad ), (""), "" )
 {
    if (dStrcmp( pathRoad,"")==0 )
       object->setSelectedRoad(NULL);
@@ -1087,7 +1087,7 @@ DefineConsoleMethod( GuiRoadEditorCtrl, setSelectedRoad, void, ( const char * pa
    }
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
 {
    DecalRoad *road = object->getSelectedRoad();
    if ( road )
@@ -1096,12 +1096,12 @@ DefineConsoleMethod( GuiRoadEditorCtrl, getSelectedRoad, S32, (), , "" )
    return NULL;
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, getSelectedNode, S32, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, getSelectedNode, S32, (), , "" )
 {
    return object->getSelectedNode();
 }
 
-DefineConsoleMethod( GuiRoadEditorCtrl, deleteRoad, void, (), , "" )
+DefineEngineMethod( GuiRoadEditorCtrl, deleteRoad, void, (), , "" )
 {
    object->deleteSelectedRoad();
 }

+ 1 - 1
Engine/source/environment/skyBox.cpp

@@ -640,7 +640,7 @@ BaseMatInstance* SkyBox::_getMaterialInstance()
    return mMatInstance;
 }
 
-DefineConsoleMethod( SkyBox, postApply, void, (), , "")
+DefineEngineMethod( SkyBox, postApply, void, (), , "")
 {
 	object->inspectPostApply();
 }

+ 2 - 2
Engine/source/environment/sun.cpp

@@ -558,12 +558,12 @@ void Sun::_onUnselected()
    Parent::_onUnselected();
 }
 
-DefineConsoleMethod(Sun, apply, void, (), , "")
+DefineEngineMethod(Sun, apply, void, (), , "")
 {
    object->inspectPostApply();
 }
 
-DefineConsoleMethod(Sun, animate, void, ( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation ), , "animate( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation )")
+DefineEngineMethod(Sun, animate, void, ( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation ), , "animate( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation )")
 {
 
    object->animate(duration, startAzimuth, endAzimuth, startElevation, endElevation);

+ 1 - 1
Engine/source/forest/editor/forestBrushElement.cpp

@@ -187,7 +187,7 @@ bool ForestBrush::containsItemData( const ForestItemData *inData )
    return false;
 }
 
-DefineConsoleMethod( ForestBrush, containsItemData, bool, ( const char * obj ), , "( ForestItemData obj )" )
+DefineEngineMethod( ForestBrush, containsItemData, bool, ( const char * obj ), , "( ForestItemData obj )" )
 {
    ForestItemData *data = NULL;
    if ( !Sim::findObject( obj, data ) )

+ 1 - 1
Engine/source/forest/editor/forestBrushTool.cpp

@@ -682,7 +682,7 @@ bool ForestBrushTool::getGroundAt( const Point3F &worldPt, F32 *zValueOut, Vecto
    return true;
 }
 
-DefineConsoleMethod( ForestBrushTool, collectElements, void, (), , "" )
+DefineEngineMethod( ForestBrushTool, collectElements, void, (), , "" )
 {
    object->collectElements();
 }

+ 6 - 6
Engine/source/forest/editor/forestEditorCtrl.cpp

@@ -370,24 +370,24 @@ bool ForestEditorCtrl::isDirty()
    return foundDirty;   
 }
 
-DefineConsoleMethod( ForestEditorCtrl, updateActiveForest, void, (), , "()" )
+DefineEngineMethod( ForestEditorCtrl, updateActiveForest, void, (), , "()" )
 {
    object->updateActiveForest( true );
 }
 
-DefineConsoleMethod( ForestEditorCtrl, setActiveTool, void, ( const char * toolName ), , "( ForestTool tool )" )
+DefineEngineMethod( ForestEditorCtrl, setActiveTool, void, ( const char * toolName ), , "( ForestTool tool )" )
 {
    ForestTool *tool = dynamic_cast<ForestTool*>( Sim::findObject( toolName ) );
    object->setActiveTool( tool );
 }
 
-DefineConsoleMethod( ForestEditorCtrl, getActiveTool, S32, (), , "()" )
+DefineEngineMethod( ForestEditorCtrl, getActiveTool, S32, (), , "()" )
 {
    ForestTool *tool = object->getActiveTool();
    return tool ? tool->getId() : 0;
 }
 
-DefineConsoleMethod( ForestEditorCtrl, deleteMeshSafe, void, ( const char * obj ), , "( ForestItemData obj )" )
+DefineEngineMethod( ForestEditorCtrl, deleteMeshSafe, void, ( const char * obj ), , "( ForestItemData obj )" )
 {
    ForestItemData *db;
    if ( !Sim::findObject( obj, db ) )
@@ -396,12 +396,12 @@ DefineConsoleMethod( ForestEditorCtrl, deleteMeshSafe, void, ( const char * obj
    object->deleteMeshSafe( db );   
 }
 
-DefineConsoleMethod( ForestEditorCtrl, isDirty, bool, (), , "" )
+DefineEngineMethod( ForestEditorCtrl, isDirty, bool, (), , "" )
 {
    return object->isDirty();
 }
 
-DefineConsoleMethod(ForestEditorCtrl, setActiveForest, void, (const char * obj), , "( Forest obj )")
+DefineEngineMethod(ForestEditorCtrl, setActiveForest, void, (const char * obj), , "( Forest obj )")
 {
    Forest *forestObject;
    if (!Sim::findObject(obj, forestObject))

+ 6 - 6
Engine/source/forest/editor/forestSelectionTool.cpp

@@ -563,32 +563,32 @@ void ForestSelectionTool::onUndoAction()
       mBounds.intersect( mSelection[i].getWorldBox() );
 }
 
-DefineConsoleMethod( ForestSelectionTool, getSelectionCount, S32, (), , "" )
+DefineEngineMethod( ForestSelectionTool, getSelectionCount, S32, (), , "" )
 {
    return object->getSelectionCount();
 }
 
-DefineConsoleMethod( ForestSelectionTool, deleteSelection, void, (), , "" )
+DefineEngineMethod( ForestSelectionTool, deleteSelection, void, (), , "" )
 {
    object->deleteSelection();
 }
 
-DefineConsoleMethod( ForestSelectionTool, clearSelection, void, (), , "" )
+DefineEngineMethod( ForestSelectionTool, clearSelection, void, (), , "" )
 {
    object->clearSelection();
 }
 
-DefineConsoleMethod( ForestSelectionTool, cutSelection, void, (), , "" )
+DefineEngineMethod( ForestSelectionTool, cutSelection, void, (), , "" )
 {
    object->cutSelection();
 }
 
-DefineConsoleMethod( ForestSelectionTool, copySelection, void, (), , "" )
+DefineEngineMethod( ForestSelectionTool, copySelection, void, (), , "" )
 {
    object->copySelection();
 }
 
-DefineConsoleMethod( ForestSelectionTool, pasteSelection, void, (), , "" )
+DefineEngineMethod( ForestSelectionTool, pasteSelection, void, (), , "" )
 {
    object->pasteSelection();
 }

+ 4 - 4
Engine/source/forest/forest.cpp

@@ -361,22 +361,22 @@ void Forest::saveDataFile( const char *path )
       mData->write( mDataFileName );
 }
 
-DefineConsoleMethod( Forest, saveDataFile, void, (const char * path), (""), "saveDataFile( [path] )" )
+DefineEngineMethod( Forest, saveDataFile, void, (const char * path), (""), "saveDataFile( [path] )" )
 {   
    object->saveDataFile( path );
 }
 
-DefineConsoleMethod(Forest, isDirty, bool, (), , "()")
+DefineEngineMethod(Forest, isDirty, bool, (), , "()")
 {
    return object->getData() && object->getData()->isDirty();
 }
 
-DefineConsoleMethod(Forest, regenCells, void, (), , "()")
+DefineEngineMethod(Forest, regenCells, void, (), , "()")
 {
    object->getData()->regenCells();
 }
 
-DefineConsoleMethod(Forest, clear, void, (), , "()" )
+DefineEngineMethod(Forest, clear, void, (), , "()" )
 {
    object->clear();
 }

+ 1 - 1
Engine/source/gfx/gfxDevice.cpp

@@ -1333,7 +1333,7 @@ DefineEngineFunction( getBestHDRFormat, GFXFormat, (),,
    return format;
 }
 
-DefineConsoleFunction(ResetGFX, void, (), , "forces the gbuffer to be reinitialized in cases of improper/lack of buffer clears.")
+DefineEngineFunction(ResetGFX, void, (), , "forces the gbuffer to be reinitialized in cases of improper/lack of buffer clears.")
 {
    GFX->beginReset();
 }

+ 1 - 1
Engine/source/gfx/gfxInit.cpp

@@ -523,7 +523,7 @@ DefineEngineStaticMethod( GFXInit, getAdapterModeCount, S32, ( S32 index ),,
    return adapters[index]->mAvailableModes.size();
 }
 
-DefineConsoleStaticMethod( GFXInit, getAdapterMode, String, ( S32 index, S32 modeIndex ),,
+DefineEngineStaticMethod( GFXInit, getAdapterMode, String, ( S32 index, S32 modeIndex ),,
    "Gets the details of the specified adapter mode.\n\n"
    "@param index Index of the adapter to query.\n"
    "@param modeIndex Index of the mode to get data from.\n"

+ 1 - 1
Engine/source/gfx/gl/gfxGLDevice.cpp

@@ -992,7 +992,7 @@ public:
 
 static GFXGLRegisterDevice pGLRegisterDevice;
 
-ConsoleFunction(cycleResources, void, 1, 1, "")
+DefineEngineFunction(cycleResources, void, (),, "")
 {
    static_cast<GFXGLDevice*>(GFX)->zombify();
    static_cast<GFXGLDevice*>(GFX)->resurrect();

+ 1 - 1
Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp

@@ -86,7 +86,7 @@ protected:
 
 GFXProfiler<GLTimer> gfxProfiler;
 
-DefineConsoleFunction(printGFXGLTimers, void,(), ,"")
+DefineEngineFunction(printGFXGLTimers, void,(), ,"")
 {
    gfxProfiler.printTimes();
 }

+ 3 - 3
Engine/source/gfx/video/theoraTextureObject.cpp

@@ -191,7 +191,7 @@ void TheoraTextureObject::play()
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( TheoraTextureObject, play, void, (),,
+DefineEngineMethod( TheoraTextureObject, play, void, (),,
    "Start playback of the video." )
 {
    object->play();
@@ -199,7 +199,7 @@ DefineConsoleMethod( TheoraTextureObject, play, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( TheoraTextureObject, stop, void, (),,
+DefineEngineMethod( TheoraTextureObject, stop, void, (),,
    "Stop playback of the video." )
 {
    object->stop();
@@ -207,7 +207,7 @@ DefineConsoleMethod( TheoraTextureObject, stop, void, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( TheoraTextureObject, pause, void, (),,
+DefineEngineMethod( TheoraTextureObject, pause, void, (),,
    "Pause playback of the video." )
 {
    object->pause();

+ 3 - 3
Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp

@@ -92,17 +92,17 @@ void GuiToolboxButtonCtrl::onSleep()
 
 //-------------------------------------
 
-DefineConsoleMethod( GuiToolboxButtonCtrl, setNormalBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is active")
+DefineEngineMethod( GuiToolboxButtonCtrl, setNormalBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is active")
 {
    object->setNormalBitmap(name);
 }
 
-DefineConsoleMethod( GuiToolboxButtonCtrl, setLoweredBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
+DefineEngineMethod( GuiToolboxButtonCtrl, setLoweredBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
 {
    object->setLoweredBitmap(name);
 }
 
-DefineConsoleMethod( GuiToolboxButtonCtrl, setHoverBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
+DefineEngineMethod( GuiToolboxButtonCtrl, setHoverBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled")
 {
    object->setHoverBitmap(name);
 }

+ 1 - 1
Engine/source/gui/controls/guiBitmapCtrl.cpp

@@ -261,7 +261,7 @@ static ConsoleDocFragment _sGuiBitmapCtrlSetBitmap2(
 
 
 //"Set the bitmap displayed in the control. Note that it is limited in size, to 256x256."
-DefineConsoleMethod( GuiBitmapCtrl, setBitmap, void, ( const char * fileRoot, bool resize), ( false),
+DefineEngineMethod( GuiBitmapCtrl, setBitmap, void, ( const char * fileRoot, bool resize), ( false),
    "( String filename | String filename, bool resize ) Assign an image to the control.\n\n"
    "@hide" )
 {

+ 3 - 3
Engine/source/gui/controls/guiColorPicker.cpp

@@ -658,17 +658,17 @@ void GuiColorPickerCtrl::setScriptValue(const char *value)
    setValue(newValue);
 }
 
-DefineConsoleMethod(GuiColorPickerCtrl, getSelectorPos, Point2I, (), , "Gets the current position of the selector")
+DefineEngineMethod(GuiColorPickerCtrl, getSelectorPos, Point2I, (), , "Gets the current position of the selector")
 {
    return object->getSelectorPos();
 }
 
-DefineConsoleMethod(GuiColorPickerCtrl, setSelectorPos, void, (Point2I newPos), , "Sets the current position of the selector")
+DefineEngineMethod(GuiColorPickerCtrl, setSelectorPos, void, (Point2I newPos), , "Sets the current position of the selector")
 {
    object->setSelectorPos(newPos);
 }
 
-DefineConsoleMethod(GuiColorPickerCtrl, updateColor, void, (), , "Forces update of pick color")
+DefineEngineMethod(GuiColorPickerCtrl, updateColor, void, (), , "Forces update of pick color")
 {
    object->updateColor();
 }

+ 3 - 3
Engine/source/gui/controls/guiFileTreeCtrl.cpp

@@ -379,18 +379,18 @@ void GuiFileTreeCtrl::recurseInsert( Item* parent, StringTableEntry path )
 
 }
 
-DefineConsoleMethod( GuiFileTreeCtrl, getSelectedPath, const char*, (), , "getSelectedPath() - returns the currently selected path in the tree")
+DefineEngineMethod( GuiFileTreeCtrl, getSelectedPath, const char*, (), , "getSelectedPath() - returns the currently selected path in the tree")
 {
    const String& path = object->getSelectedPath();
    return Con::getStringArg( path );
 }
 
-DefineConsoleMethod( GuiFileTreeCtrl, setSelectedPath, bool, (const char * path), , "setSelectedPath(path) - expands the tree to the specified path")
+DefineEngineMethod( GuiFileTreeCtrl, setSelectedPath, bool, (const char * path), , "setSelectedPath(path) - expands the tree to the specified path")
 {
    return object->setSelectedPath( path );
 }
 
-DefineConsoleMethod( GuiFileTreeCtrl, reload, void, (), , "() - Reread the directory tree hierarchy." )
+DefineEngineMethod( GuiFileTreeCtrl, reload, void, (), , "() - Reread the directory tree hierarchy." )
 {
    object->updateTree();
 }

+ 2 - 2
Engine/source/gui/controls/guiGradientCtrl.cpp

@@ -601,7 +601,7 @@ void GuiGradientCtrl::sortColorRange()
 		dQsort( mAlphaRange.address(), mAlphaRange.size(), sizeof(ColorRange), _numIncreasing);
 }
 
-DefineConsoleMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count")
+DefineEngineMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count")
 {
 	if( object->getDisplayMode() == GuiGradientCtrl::pHorizColorRange )
 		return object->mColorRange.size();
@@ -611,7 +611,7 @@ DefineConsoleMethod(GuiGradientCtrl, getColorCount, S32, (), , "Get color count"
 	return 0;
 }
 
-DefineConsoleMethod(GuiGradientCtrl, getColor, LinearColorF, (S32 idx), , "Get color value")
+DefineEngineMethod(GuiGradientCtrl, getColor, LinearColorF, (S32 idx), , "Get color value")
 {
 
 	if( object->getDisplayMode() == GuiGradientCtrl::pHorizColorRange )

+ 1 - 1
Engine/source/gui/controls/guiMaterialCtrl.cpp

@@ -167,7 +167,7 @@ void GuiMaterialCtrl::onRender( Point2I offset, const RectI &updateRect )
    GFX->setTexture( 0, NULL );
 }
 
-DefineConsoleMethod( GuiMaterialCtrl, setMaterial, bool, ( const char * materialName ), , "( string materialName )"
+DefineEngineMethod( GuiMaterialCtrl, setMaterial, bool, ( const char * materialName ), , "( string materialName )"
                "Set the material to be displayed in the control." )
 {
    return object->setMaterial( materialName );

+ 19 - 19
Engine/source/gui/controls/guiPopUpCtrl.cpp

@@ -300,82 +300,82 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
+DefineEngineMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
 {
    object->addEntry(name, idNum, scheme);
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, addScheme, void, (U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL), , 
+DefineEngineMethod( GuiPopUpMenuCtrl, addScheme, void, (U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL), , 
    "(int id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL)")
 {
 
    object->addScheme( id, fontColor, fontColorHL, fontColorSEL );
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, getText, const char*, (), , "")
+DefineEngineMethod( GuiPopUpMenuCtrl, getText, const char*, (), , "")
 {
    return object->getText();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, clear, void, (), , "Clear the popup list.")
+DefineEngineMethod( GuiPopUpMenuCtrl, clear, void, (), , "Clear the popup list.")
 {
    object->clear();
 }
 
 //FIXME: clashes with SimSet.sort
-DefineConsoleMethod(GuiPopUpMenuCtrl, sort, void, (), , "Sort the list alphabetically.")
+DefineEngineMethod(GuiPopUpMenuCtrl, sort, void, (), , "Sort the list alphabetically.")
 {
    object->sort();
 }
 
 //  Added to sort the entries by ID
-DefineConsoleMethod(GuiPopUpMenuCtrl, sortID, void, (), , "Sort the list by ID.")
+DefineEngineMethod(GuiPopUpMenuCtrl, sortID, void, (), , "Sort the list by ID.")
 {
    object->sortID();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, forceOnAction, void, (), , "")
+DefineEngineMethod( GuiPopUpMenuCtrl, forceOnAction, void, (), , "")
 {
    object->onAction();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, forceClose, void, (), , "")
+DefineEngineMethod( GuiPopUpMenuCtrl, forceClose, void, (), , "")
 {
    object->closePopUp();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "Gets the selected index")
+DefineEngineMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "Gets the selected index")
 {
    return object->getSelected();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, setSelected, void, (S32 id,  bool scriptCallback), (true), "(int id, [scriptCallback=true])")
+DefineEngineMethod( GuiPopUpMenuCtrl, setSelected, void, (S32 id,  bool scriptCallback), (true), "(int id, [scriptCallback=true])")
 {
    object->setSelected( id, scriptCallback );
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])")
+DefineEngineMethod( GuiPopUpMenuCtrl, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])")
 {
    object->setFirstSelected( scriptCallback );
 
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, setNoneSelected, void, (), , "")
+DefineEngineMethod( GuiPopUpMenuCtrl, setNoneSelected, void, (), , "")
 {
    object->setNoneSelected();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, getTextById, const char*, (S32 id), ,  "(int id)")
+DefineEngineMethod( GuiPopUpMenuCtrl, getTextById, const char*, (S32 id), ,  "(int id)")
 {
    return(object->getTextById(id));
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, changeTextById, void, ( S32 id, const char * text ), , "( int id, string text )" )
+DefineEngineMethod( GuiPopUpMenuCtrl, changeTextById, void, ( S32 id, const char * text ), , "( int id, string text )" )
 {
    object->setEntryText( id, text );
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * className, const char * enumName), , "(string class, string enum)"
+DefineEngineMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * className, const char * enumName), , "(string class, string enum)"
               "This fills the popup with a classrep's field enumeration type info.\n\n"
               "More of a helper function than anything.   If console access to the field list is added, "
               "at least for the enumerated types, then this should go away..")
@@ -429,20 +429,20 @@ DefineConsoleMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * class
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrl, findText, S32, (const char * text), , "(string text)"
+DefineEngineMethod( GuiPopUpMenuCtrl, findText, S32, (const char * text), , "(string text)"
               "Returns the position of the first entry containing the specified text or -1 if not found.")
 {
    return( object->findText( text ) );   
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrl, size, S32, (), , "Get the size of the menu - the number of entries in it.")
+DefineEngineMethod( GuiPopUpMenuCtrl, size, S32, (), , "Get the size of the menu - the number of entries in it.")
 {
    return( object->getNumEntries() ); 
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrl, replaceText, void, (bool doReplaceText), , "(bool doReplaceText)")
+DefineEngineMethod( GuiPopUpMenuCtrl, replaceText, void, (bool doReplaceText), , "(bool doReplaceText)")
 {
    object->replaceText(S32(doReplaceText));  
 }
@@ -532,7 +532,7 @@ void GuiPopUpMenuCtrl::clearEntry( S32 entry )
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrl, clearEntry, void, (S32 entry), , "(S32 entry)")
+DefineEngineMethod( GuiPopUpMenuCtrl, clearEntry, void, (S32 entry), , "(S32 entry)")
 {
    object->clearEntry(entry);
 }

+ 9 - 9
Engine/source/gui/controls/guiPopUpCtrlEx.cpp

@@ -364,7 +364,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExAdd(
    "void add(string name, S32 idNum, S32 scheme=0);"
 );
 
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
+DefineEngineMethod( GuiPopUpMenuCtrlEx, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)")
 {
    object->addEntry(name, idNum, scheme);
 }
@@ -525,7 +525,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExsetSelected(
    "setSelected(int id, bool scriptCallback=true);"
 );
 
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])"
+DefineEngineMethod( GuiPopUpMenuCtrlEx, setSelected, void, (S32 id, bool scriptCallback), (true), "(int id, [scriptCallback=true])"
            "@hide")
 {
    object->setSelected( id, scriptCallback );
@@ -539,7 +539,7 @@ ConsoleDocFragment _GuiPopUpMenuCtrlExsetFirstSelected(
 );
 
 
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])"
+DefineEngineMethod( GuiPopUpMenuCtrlEx, setFirstSelected, void, (bool scriptCallback), (true), "([scriptCallback=true])"
            "@hide")
 {
    object->setFirstSelected( scriptCallback );
@@ -561,7 +561,7 @@ DefineEngineMethod( GuiPopUpMenuCtrlEx, getTextById, const char*, (S32 id),,
 }
 
 
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, getColorById,  ColorI, (S32 id), ,  
+DefineEngineMethod( GuiPopUpMenuCtrlEx, getColorById,  ColorI, (S32 id), ,  
            "@brief Get color of an entry's box\n\n"
            "@param id ID number of entry to query\n\n"
            "@return ColorI in the format of \"Red Green Blue Alpha\", each of with is a value between 0 - 255")
@@ -572,7 +572,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, getColorById,  ColorI, (S32 id), ,
 
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * className, const char * enumName ), ,
+DefineEngineMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * className, const char * enumName ), ,
            "@brief This fills the popup with a classrep's field enumeration type info.\n\n"
               "More of a helper function than anything.   If console access to the field list is added, "
               "at least for the enumerated types, then this should go away.\n\n"
@@ -628,7 +628,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, setEnumContent, void, ( const char * cl
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "(string text)"
+DefineEngineMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "(string text)"
               "Returns the id of the first entry containing the specified text or -1 if not found."
            "@param text String value used for the query\n\n"
            "@return Numerical ID of entry containing the text.")
@@ -637,7 +637,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, findText, S32, (const char * text), , "
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, size, S32, (), , 
+DefineEngineMethod( GuiPopUpMenuCtrlEx, size, S32, (), , 
            "@brief Get the size of the menu\n\n"
            "@return Number of entries in the menu\n")
 {
@@ -645,7 +645,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrlEx, size, S32, (), ,
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, replaceText, void, (S32 boolVal), , 
+DefineEngineMethod( GuiPopUpMenuCtrlEx, replaceText, void, (S32 boolVal), , 
            "@brief Flag that causes each new text addition to replace the current entry\n\n"
            "@param True to turn on replacing, false to disable it")
 {
@@ -737,7 +737,7 @@ void GuiPopUpMenuCtrlEx::clearEntry( S32 entry )
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( GuiPopUpMenuCtrlEx, clearEntry, void, (S32 entry), , "(S32 entry)")
+DefineEngineMethod( GuiPopUpMenuCtrlEx, clearEntry, void, (S32 entry), , "(S32 entry)")
 {
    object->clearEntry(entry);
 }

+ 23 - 24
Engine/source/gui/core/guiCanvas.cpp

@@ -2139,7 +2139,7 @@ ConsoleDocFragment _pushDialog(
    "void pushDialog( GuiControl ctrl, int layer=0, bool center=false);"
 );
 
-DefineConsoleMethod( GuiCanvas, pushDialog, void, (const char * ctrlName, S32 layer, bool center), ( 0, false), "(GuiControl ctrl, int layer=0, bool center=false)"
+DefineEngineMethod( GuiCanvas, pushDialog, void, (const char * ctrlName, S32 layer, bool center), ( 0, false), "(GuiControl ctrl, int layer=0, bool center=false)"
            "@hide")
 {
    GuiControl *gui;
@@ -2176,7 +2176,7 @@ ConsoleDocFragment _popDialog2(
    "void popDialog();"
 );
 
-DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (nullAsType<GuiControl*>()), "(GuiControl ctrl=NULL)"
+DefineEngineMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (nullAsType<GuiControl*>()), "(GuiControl ctrl=NULL)"
            "@hide")
 {
    if (gui)
@@ -2204,7 +2204,7 @@ ConsoleDocFragment _popLayer2(
    "void popLayer(S32 layer);"
 );
 
-DefineConsoleMethod( GuiCanvas, popLayer, void, (S32 layer), (0), "(int layer)" 
+DefineEngineMethod( GuiCanvas, popLayer, void, (S32 layer), (0), "(int layer)" 
            "@hide")
 {
 
@@ -2362,7 +2362,7 @@ ConsoleDocFragment _setCursorPos2(
    "bool setCursorPos( F32 posX, F32 posY);"
 );
 
-DefineConsoleMethod( GuiCanvas, setCursorPos, void, (Point2I pos), , "(Point2I pos)"
+DefineEngineMethod( GuiCanvas, setCursorPos, void, (Point2I pos), , "(Point2I pos)"
            "@hide")
 {
 
@@ -2647,7 +2647,7 @@ DefineEngineMethod( GuiCanvas, setWindowPosition, void, ( Point2I position ),,
    object->getPlatformWindow()->setPosition( position );
 }
 
-DefineConsoleMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas currently fullscreen?" )
+DefineEngineMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas currently fullscreen?" )
 {
    if (Platform::getWebDeployment())
       return false;
@@ -2658,14 +2658,14 @@ DefineConsoleMethod( GuiCanvas, isFullscreen, bool, (), , "() - Is this canvas c
    return object->getPlatformWindow()->getVideoMode().fullScreen;
 }
 
-DefineConsoleMethod( GuiCanvas, minimizeWindow, void, (), , "() - minimize this canvas' window." )
+DefineEngineMethod( GuiCanvas, minimizeWindow, void, (), , "() - minimize this canvas' window." )
 {
    PlatformWindow* window = object->getPlatformWindow();
    if ( window )
       window->minimize();
 }
 
-DefineConsoleMethod( GuiCanvas, isMinimized, bool, (), , "()" )
+DefineEngineMethod( GuiCanvas, isMinimized, bool, (), , "()" )
 {
    PlatformWindow* window = object->getPlatformWindow();
    if ( window )
@@ -2674,7 +2674,7 @@ DefineConsoleMethod( GuiCanvas, isMinimized, bool, (), , "()" )
    return false;
 }
 
-DefineConsoleMethod( GuiCanvas, isMaximized, bool, (), , "()" )
+DefineEngineMethod( GuiCanvas, isMaximized, bool, (), , "()" )
 {
    PlatformWindow* window = object->getPlatformWindow();
    if ( window )
@@ -2683,21 +2683,21 @@ DefineConsoleMethod( GuiCanvas, isMaximized, bool, (), , "()" )
    return false;
 }
 
-DefineConsoleMethod( GuiCanvas, maximizeWindow, void, (), , "() - maximize this canvas' window." )
+DefineEngineMethod( GuiCanvas, maximizeWindow, void, (), , "() - maximize this canvas' window." )
 {
    PlatformWindow* window = object->getPlatformWindow();
    if ( window )
       window->maximize();
 }
 
-DefineConsoleMethod( GuiCanvas, restoreWindow, void, (), , "() - restore this canvas' window." )
+DefineEngineMethod( GuiCanvas, restoreWindow, void, (), , "() - restore this canvas' window." )
 {
    PlatformWindow* window = object->getPlatformWindow();
    if( window )
       window->restore();
 }
 
-DefineConsoleMethod( GuiCanvas, setFocus, void, (), , "() - Claim OS input focus for this canvas' window.")
+DefineEngineMethod( GuiCanvas, setFocus, void, (), , "() - Claim OS input focus for this canvas' window.")
 {
    PlatformWindow* window = object->getPlatformWindow();
    if( window )
@@ -2712,7 +2712,7 @@ DefineEngineMethod( GuiCanvas, setMenuBar, void, ( GuiControl* menu ),,
    return object->setMenuBar( menu );
 }
 
-DefineConsoleMethod( GuiCanvas, setVideoMode, void, 
+DefineEngineMethod( GuiCanvas, setVideoMode, void, 
                (U32 width, U32 height, bool fullscreen, U32 bitDepth, U32 refreshRate, U32 antialiasLevel), 
                ( false, 0, 0, 0),
                "(int width, int height, bool fullscreen, [int bitDepth], [int refreshRate], [int antialiasLevel] )\n"
@@ -2812,7 +2812,7 @@ DefineConsoleMethod( GuiCanvas, setVideoMode, void,
    Con::setVariable( "$pref::Video::mode", vm.toString() );
 }
 
-ConsoleMethod( GuiCanvas, showWindow, void, 2, 2, "" )
+DefineEngineMethod(GuiCanvas, showWindow, void, (),, "")
 {
    if (!object->getPlatformWindow())
       return;
@@ -2822,7 +2822,7 @@ ConsoleMethod( GuiCanvas, showWindow, void, 2, 2, "" )
    object->getPlatformWindow()->setDisplayWindow(true);
 }
 
-ConsoleMethod( GuiCanvas, hideWindow, void, 2, 2, "" )
+DefineEngineMethod(GuiCanvas, hideWindow, void, (),, "")
 {
    if (!object->getPlatformWindow())
       return;
@@ -2832,30 +2832,29 @@ ConsoleMethod( GuiCanvas, hideWindow, void, 2, 2, "" )
    object->getPlatformWindow()->setDisplayWindow(false);
 }
 
-ConsoleMethod( GuiCanvas, cursorClick, void, 4, 4, "button, isDown" )
+DefineEngineMethod(GuiCanvas, cursorClick, void, (S32 buttonId, bool isDown), , "")
 {
-   const S32 buttonId = dAtoi(argv[2]);
-   const bool isDown = dAtob(argv[3]);
-
    object->cursorClick(buttonId, isDown);
 }
 
-ConsoleMethod( GuiCanvas, cursorNudge, void, 4, 4, "x, y" )
+DefineEngineMethod(GuiCanvas, cursorNudge, void, (F32 x, F32 y), , "")
 {
-   object->cursorNudge(dAtof(argv[2]), dAtof(argv[3]));
+   object->cursorNudge(x, y);
 }
+
 // This function allows resetting of the video-mode from script. It was motivated by
 // the need to temporarily disable vsync during datablock cache load to avoid a 
 // significant slowdown.
 bool AFX_forceVideoReset = false;
 
-ConsoleMethod( GuiCanvas, resetVideoMode, void, 2,2, "()")
+
+DefineEngineMethod(GuiCanvas, resetVideoMode, void, (), , "")
 {
    PlatformWindow* window = object->getPlatformWindow();
-   if( window )
+   if (window)
    {
-      GFXWindowTarget* gfx_target =  window->getGFXTarget();
-      if ( gfx_target )
+      GFXWindowTarget* gfx_target = window->getGFXTarget();
+      if (gfx_target)
       {
          AFX_forceVideoReset = true;
          gfx_target->resetMode();

+ 1 - 1
Engine/source/gui/core/guiControl.cpp

@@ -2898,7 +2898,7 @@ static ConsoleDocFragment _sGuiControlSetExtent2(
    "GuiControl", // The class to place the method in; use NULL for functions.
    "void setExtent( Point2I p );" ); // The definition string.
 
-DefineConsoleMethod( GuiControl, setExtent, void, ( const char* extOrX, const char* y ), (""),
+DefineEngineMethod( GuiControl, setExtent, void, ( const char* extOrX, const char* y ), (""),
    "( Point2I p | int x, int y ) Set the width and height of the control.\n\n"
    "@hide" )
 {

+ 8 - 8
Engine/source/gui/editor/guiDebugger.cpp

@@ -66,13 +66,13 @@ DbgFileView::DbgFileView()
    mSize.set(1, 0);
 }
 
-DefineConsoleMethod(DbgFileView, setCurrentLine, void, (S32 line, bool selected), , "(int line, bool selected)"
+DefineEngineMethod(DbgFileView, setCurrentLine, void, (S32 line, bool selected), , "(int line, bool selected)"
               "Set the current highlighted line.")
 {
    object->setCurrentLine(line, selected);
 }
 
-DefineConsoleMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
+DefineEngineMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
               "Get the currently executing file and line, if any.\n\n"
               "@returns A string containing the file, a tab, and then the line number."
               " Use getField() with this.")
@@ -84,38 +84,38 @@ DefineConsoleMethod(DbgFileView, getCurrentLine, const char *, (), , "()"
 	return ret;
 }
 
-DefineConsoleMethod(DbgFileView, open, bool, (const char * filename), , "(string filename)"
+DefineEngineMethod(DbgFileView, open, bool, (const char * filename), , "(string filename)"
               "Open a file for viewing.\n\n"
               "@note This loads the file from the local system.")
 {
    return object->openFile(filename);
 }
 
-DefineConsoleMethod(DbgFileView, clearBreakPositions, void, (), , "()"
+DefineEngineMethod(DbgFileView, clearBreakPositions, void, (), , "()"
               "Clear all break points in the current file.")
 {
    object->clearBreakPositions();
 }
 
-DefineConsoleMethod(DbgFileView, setBreakPosition, void, (U32 line), , "(int line)"
+DefineEngineMethod(DbgFileView, setBreakPosition, void, (U32 line), , "(int line)"
               "Set a breakpoint at the specified line.")
 {
    object->setBreakPosition(line);
 }
 
-DefineConsoleMethod(DbgFileView, setBreak, void, (U32 line), , "(int line)"
+DefineEngineMethod(DbgFileView, setBreak, void, (U32 line), , "(int line)"
               "Set a breakpoint at the specified line.")
 {
    object->setBreakPointStatus(line, true);
 }
 
-DefineConsoleMethod(DbgFileView, removeBreak, void, (U32 line), , "(int line)"
+DefineEngineMethod(DbgFileView, removeBreak, void, (U32 line), , "(int line)"
               "Remove a breakpoint from the specified line.")
 {
    object->setBreakPointStatus(line, false);
 }
 
-DefineConsoleMethod(DbgFileView, findString, bool, (const char * findThis), , "(string findThis)"
+DefineEngineMethod(DbgFileView, findString, bool, (const char * findThis), , "(string findThis)"
               "Find the specified string in the currently viewed file and "
               "scroll it into view.")
 {

+ 28 - 28
Engine/source/gui/editor/guiEditCtrl.cpp

@@ -2468,7 +2468,7 @@ void GuiEditCtrl::startMouseGuideDrag( guideAxis axis, U32 guideIndex, bool lock
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the toplevel control edited inside the GUI editor." )
+DefineEngineMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the toplevel control edited inside the GUI editor." )
 {
    GuiControl* ctrl = object->getContentControl();
    if( ctrl )
@@ -2479,7 +2479,7 @@ DefineConsoleMethod( GuiEditCtrl, getContentControl, S32, (), , "() - Return the
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ), , "( GuiControl ctrl ) - Set the toplevel control to edit in the GUI editor." )
+DefineEngineMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ), , "( GuiControl ctrl ) - Set the toplevel control to edit in the GUI editor." )
 {
    if (ctrl)
       object->setContentControl(ctrl);
@@ -2487,7 +2487,7 @@ DefineConsoleMethod( GuiEditCtrl, setContentControl, void, (GuiControl *ctrl ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
+DefineEngineMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
 {
    if (ctrl)
       object->addNewControl(ctrl);
@@ -2495,28 +2495,28 @@ DefineConsoleMethod( GuiEditCtrl, addNewCtrl, void, (GuiControl *ctrl), , "(GuiC
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, addSelection, void, (S32 id), , "selects a control.")
+DefineEngineMethod( GuiEditCtrl, addSelection, void, (S32 id), , "selects a control.")
 {
    object->addSelection(id);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, removeSelection, void, (S32 id), , "deselects a control.")
+DefineEngineMethod( GuiEditCtrl, removeSelection, void, (S32 id), , "deselects a control.")
 {
    object->removeSelection(id);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, clearSelection, void, (), , "Clear selected controls list.")
+DefineEngineMethod( GuiEditCtrl, clearSelection, void, (), , "Clear selected controls list.")
 {
    object->clearSelection();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
+DefineEngineMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiControl ctrl)")
 {
    if (ctrl)
    object->setSelection(ctrl, false);
@@ -2524,7 +2524,7 @@ DefineConsoleMethod( GuiEditCtrl, select, void, (GuiControl *ctrl), , "(GuiContr
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet), , "(GuiControl ctrl)")
+DefineEngineMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet), , "(GuiControl ctrl)")
 {
    if (addSet)
    object->setCurrentAddSet(addSet);
@@ -2532,7 +2532,7 @@ DefineConsoleMethod( GuiEditCtrl, setCurrentAddSet, void, (GuiControl *addSet),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set to which new controls will be added")
+DefineEngineMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set to which new controls will be added")
 {
    const GuiControl* add = object->getCurrentAddSet();
    return add ? add->getId() : 0;
@@ -2540,49 +2540,49 @@ DefineConsoleMethod( GuiEditCtrl, getCurrentAddSet, S32, (), , "Returns the set
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, toggle, void, (), , "Toggle activation.")
+DefineEngineMethod( GuiEditCtrl, toggle, void, (), , "Toggle activation.")
 {
    object->setEditMode( !object->isActive() );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, justify, void, (U32 mode), , "(int mode)" )
+DefineEngineMethod( GuiEditCtrl, justify, void, (U32 mode), , "(int mode)" )
 {
    object->justifySelection( (GuiEditCtrl::Justification)mode );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, bringToFront, void, (), , "")
+DefineEngineMethod( GuiEditCtrl, bringToFront, void, (), , "")
 {
    object->bringToFront();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, pushToBack, void, (), , "")
+DefineEngineMethod( GuiEditCtrl, pushToBack, void, (), , "")
 {
    object->pushToBack();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, deleteSelection, void, (), , "() - Delete the selected controls.")
+DefineEngineMethod( GuiEditCtrl, deleteSelection, void, (), , "() - Delete the selected controls.")
 {
    object->deleteSelection();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, moveSelection, void, (S32 dx, S32 dy), , "Move all controls in the selection by (dx,dy) pixels.")
+DefineEngineMethod( GuiEditCtrl, moveSelection, void, (S32 dx, S32 dy), , "Move all controls in the selection by (dx,dy) pixels.")
 {
    object->moveAndSnapSelection(Point2I(dx, dy));
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, saveSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Save selection to file or clipboard.")
+DefineEngineMethod( GuiEditCtrl, saveSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Save selection to file or clipboard.")
 {
       
    object->saveSelection( filename );
@@ -2590,7 +2590,7 @@ DefineConsoleMethod( GuiEditCtrl, saveSelection, void, (const char * filename),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, loadSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Load selection from file or clipboard.")
+DefineEngineMethod( GuiEditCtrl, loadSelection, void, (const char * filename), (nullAsType<const char*>()), "( string fileName=null ) - Load selection from file or clipboard.")
 {
 
    object->loadSelection( filename );
@@ -2598,7 +2598,7 @@ DefineConsoleMethod( GuiEditCtrl, loadSelection, void, (const char * filename),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, selectAll, void, (), , "()")
+DefineEngineMethod( GuiEditCtrl, selectAll, void, (), , "()")
 {
    object->selectAll();
 }
@@ -2613,14 +2613,14 @@ DefineEngineMethod( GuiEditCtrl, getSelection, SimSet*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, getNumSelected, S32, (), , "() - Return the number of controls currently selected." )
+DefineEngineMethod( GuiEditCtrl, getNumSelected, S32, (), , "() - Return the number of controls currently selected." )
 {
    return object->getNumSelected();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "() - Returns global bounds of current selection as vector 'x y width height'." )
+DefineEngineMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "() - Returns global bounds of current selection as vector 'x y width height'." )
 {
    RectI bounds = object->getSelectionGlobalBounds();
    String str = String::ToString( "%i %i %i %i", bounds.point.x, bounds.point.y, bounds.extent.x, bounds.extent.y );
@@ -2633,7 +2633,7 @@ DefineConsoleMethod( GuiEditCtrl, getSelectionGlobalBounds, const char*, (), , "
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select parents of currently selected controls." )
+DefineEngineMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select parents of currently selected controls." )
 {
       
    object->selectParents( addToSelection );
@@ -2641,7 +2641,7 @@ DefineConsoleMethod( GuiEditCtrl, selectParents, void, ( bool addToSelection ),
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, selectChildren, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select children of currently selected controls." )
+DefineEngineMethod( GuiEditCtrl, selectChildren, void, ( bool addToSelection ), (false), "( bool addToSelection=false ) - Select children of currently selected controls." )
 {
       
    object->selectChildren( addToSelection );
@@ -2657,14 +2657,14 @@ DefineEngineMethod( GuiEditCtrl, getTrash, SimGroup*, (),,
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(GuiEditCtrl, setSnapToGrid, void, (U32 gridsize), , "GuiEditCtrl.setSnapToGrid(gridsize)")
+DefineEngineMethod(GuiEditCtrl, setSnapToGrid, void, (U32 gridsize), , "GuiEditCtrl.setSnapToGrid(gridsize)")
 {
    object->setSnapToGrid(gridsize);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis ), (-1), "( GuiControl ctrl [, int axis ] ) - Read the guides from the given control." )
+DefineEngineMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis ), (-1), "( GuiControl ctrl [, int axis ] ) - Read the guides from the given control." )
 {
    // Find the control.
    
@@ -2694,7 +2694,7 @@ DefineConsoleMethod( GuiEditCtrl, readGuides, void, ( GuiControl* ctrl, S32 axis
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axis ), ( -1), "( GuiControl ctrl [, int axis ] ) - Write the guides to the given control." )
+DefineEngineMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axis ), ( -1), "( GuiControl ctrl [, int axis ] ) - Write the guides to the given control." )
 {
    // Find the control.
    
@@ -2724,7 +2724,7 @@ DefineConsoleMethod( GuiEditCtrl, writeGuides, void, ( GuiControl* ctrl, S32 axi
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ int axis ] ) - Clear all currently set guide lines." )
+DefineEngineMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ int axis ] ) - Clear all currently set guide lines." )
 {
    if( axis != -1 )
    {
@@ -2745,7 +2745,7 @@ DefineConsoleMethod( GuiEditCtrl, clearGuides, void, ( S32 axis ), (-1), "( [ in
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height), (true, true), "( bool width=true, bool height=true ) - Fit selected controls into their parents." )
+DefineEngineMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height), (true, true), "( bool width=true, bool height=true ) - Fit selected controls into their parents." )
 {
       
    object->fitIntoParents( width, height );
@@ -2753,7 +2753,7 @@ DefineConsoleMethod( GuiEditCtrl, fitIntoParents, void, (bool width, bool height
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiEditCtrl, getMouseMode, const char*, (), , "() - Return the current mouse mode." )
+DefineEngineMethod( GuiEditCtrl, getMouseMode, const char*, (), , "() - Return the current mouse mode." )
 {
    switch( object->getMouseMode() )
    {

+ 3 - 3
Engine/source/gui/editor/guiFilterCtrl.cpp

@@ -60,7 +60,7 @@ void GuiFilterCtrl::initPersistFields()
    Parent::initPersistFields();
 }
 
-DefineConsoleMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple containing all the values in the filter."
+DefineEngineMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple containing all the values in the filter."
 			  "@internal")
 {
    static char buffer[512];
@@ -77,7 +77,7 @@ DefineConsoleMethod( GuiFilterCtrl, getValue, const char*, (), , "Return a tuple
    return buffer;
 }
 
-ConsoleMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
+DefineEngineStringlyVariadicMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
               "Reset the filter to use the specified points, spread equidistantly across the domain."
 			  "@internal")
 {
@@ -89,7 +89,7 @@ ConsoleMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1, f2, ...)"
 	object->set(filter);
 }
 
-DefineConsoleMethod( GuiFilterCtrl, identity, void, (), , "Reset the filtering."
+DefineEngineMethod( GuiFilterCtrl, identity, void, (), , "Reset the filtering."
 			  "@internal")
 {
    object->identity();

+ 1 - 1
Engine/source/gui/editor/guiGraphCtrl.cpp

@@ -407,7 +407,7 @@ DefineEngineMethod( GuiGraphCtrl, setGraphType, void, ( S32 plotId, GuiGraphType
 
 //-----------------------------------------------------------------------------
 
-ConsoleMethod( GuiGraphCtrl, matchScale, void, 3, GuiGraphCtrl::MaxPlots + 2, "( int plotID1, int plotID2, ... ) "
+DefineEngineStringlyVariadicMethod( GuiGraphCtrl, matchScale, void, 3, GuiGraphCtrl::MaxPlots + 2, "( int plotID1, int plotID2, ... ) "
    "Set the scale of all specified plots to the maximum scale among them.\n\n"
    "@param plotID1 Index of plotting curve.\n"
    "@param plotID2 Index of plotting curve." )

+ 6 - 7
Engine/source/gui/editor/guiInspectorTypes.cpp

@@ -601,13 +601,12 @@ void GuiInspectorTypeFileName::updateValue()
    }
 }
 
-ConsoleMethod( GuiInspectorTypeFileName, apply, void, 3,3, "apply(newValue);" )
+DefineEngineMethod(GuiInspectorTypeFileName, apply, void, (String path), , "")
 {
-   String path( (const char*)argv[2] );
-   if ( path.isNotEmpty() )
-      path = Platform::makeRelativePathName( path, Platform::getMainDotCsDir() );
-      
-   object->setData( path.c_str() );
+   if (path.isNotEmpty())
+      path = Platform::makeRelativePathName(path, Platform::getMainDotCsDir());
+
+   object->setData(path.c_str());
 }
 
 
@@ -1501,7 +1500,7 @@ void GuiInspectorTypeBitMask32::updateData()
    setData( data );   
 }
 
-ConsoleMethod( GuiInspectorTypeBitMask32, applyBit, void, 2,2, "apply();" )
+DefineEngineMethod( GuiInspectorTypeBitMask32, applyBit, void, (),, "" )
 {
    object->updateData();
 }

+ 6 - 6
Engine/source/gui/editor/guiMenuBar.cpp

@@ -1486,7 +1486,7 @@ PopupMenu* GuiMenuBar::findMenu(StringTableEntry barTitle)
 //-----------------------------------------------------------------------------
 // Console Methods
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 pos), , "(GuiCanvas, pos)")
+DefineEngineMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 pos), , "(GuiCanvas, pos)")
 {
    GuiCanvas* canv = dynamic_cast<GuiCanvas*>(Sim::findObject(canvas));
    if (canv)
@@ -1495,7 +1495,7 @@ DefineConsoleMethod(GuiMenuBar, attachToCanvas, void, (const char *canvas, S32 p
    }
 }
 
-DefineConsoleMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
+DefineEngineMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
 {
    GuiCanvas* canvas = object->getRoot();
 
@@ -1503,23 +1503,23 @@ DefineConsoleMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
       canvas->setMenuBar(nullptr);
 }
 
-DefineConsoleMethod(GuiMenuBar, getMenuCount, S32, (), , "()")
+DefineEngineMethod(GuiMenuBar, getMenuCount, S32, (), , "()")
 {
    return object->getMenuListCount();
 }
 
-DefineConsoleMethod(GuiMenuBar, getMenu, S32, (S32 index), (0), "(Index)")
+DefineEngineMethod(GuiMenuBar, getMenu, S32, (S32 index), (0), "(Index)")
 {
    return object->getMenu(index)->getId();
 }
 
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nullAsType<SimObject*>(), -1), "(object, pos) insert object at position")
+DefineEngineMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nullAsType<SimObject*>(), -1), "(object, pos) insert object at position")
 {
    object->insert(pObject, pos);
 }
 
-DefineConsoleMethod(GuiMenuBar, findMenu, S32, (const char* barTitle), (""), "(barTitle)")
+DefineEngineMethod(GuiMenuBar, findMenu, S32, (const char* barTitle), (""), "(barTitle)")
 {
    StringTableEntry barTitleStr = StringTable->insert(barTitle);
    PopupMenu* menu = object->findMenu(barTitleStr);

+ 30 - 30
Engine/source/gui/editor/guiParticleGraphCtrl.cpp

@@ -1004,7 +1004,7 @@ bool GuiParticleGraphCtrl::renderGraphTooltip(Point2I cursorPos, StringTableEntr
    return true;
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), , "(int point)"
+DefineEngineMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), , "(int point)"
               "Set the selected point on the graph.\n"
            "@return No return value")
 {
@@ -1016,7 +1016,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPoint, void, (S32 point), ,
    object->setSelectedPoint( point );
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), , "(int plotID)"
+DefineEngineMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), , "(int plotID)"
               "Set the selected plot (a.k.a. graph)."
            "@return No return value" )
 {
@@ -1028,7 +1028,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setSelectedPlot, void, (S32 plotID), ,
    object->setSelectedPlot( plotID );
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(int plotID)"
+DefineEngineMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(int plotID)"
               "Clear the graph of the given plot."
            "@return No return value")
 {
@@ -1040,14 +1040,14 @@ DefineConsoleMethod(GuiParticleGraphCtrl, clearGraph, void, (S32 plotID), , "(in
    object->clearGraph( plotID );
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, clearAllGraphs, void, (), , "()"
+DefineEngineMethod(GuiParticleGraphCtrl, clearAllGraphs, void, (), , "()"
               "Clear all of the graphs."
            "@return No return value")
 {
    object->clearAllGraphs();
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, addPlotPoint, S32, (S32 plotID, F32 x, F32 y, bool setAdded), (true), "(int plotID, float x, float y, bool setAdded = true;)"
+DefineEngineMethod(GuiParticleGraphCtrl, addPlotPoint, S32, (S32 plotID, F32 x, F32 y, bool setAdded), (true), "(int plotID, float x, float y, bool setAdded = true;)"
               "Add a data point to the given plot."
            "@return")
 {
@@ -1060,7 +1060,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, addPlotPoint, S32, (S32 plotID, F32 x,
    return object->addPlotPoint( plotID, Point2F(x, y), setAdded);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, insertPlotPoint, void, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)\n"
+DefineEngineMethod(GuiParticleGraphCtrl, insertPlotPoint, void, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)\n"
               "Insert a data point to the given plot and plot position.\n"
            "@param plotID The plot you want to access\n"
            "@param i The data point.\n"
@@ -1075,7 +1075,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, insertPlotPoint, void, (S32 plotID, S3
    object->insertPlotPoint( plotID, i, Point2F(x, y));
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, changePlotPoint, S32, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)"
+DefineEngineMethod(GuiParticleGraphCtrl, changePlotPoint, S32, (S32 plotID, S32 i, F32 x, F32 y), , "(int plotID, int i, float x, float y)"
               "Change a data point to the given plot and plot position.\n"
            "@param plotID The plot you want to access\n"
            "@param i The data point.\n"
@@ -1090,21 +1090,21 @@ DefineConsoleMethod(GuiParticleGraphCtrl, changePlotPoint, S32, (S32 plotID, S32
    return object->changePlotPoint( plotID, i, Point2F(x, y));
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPlot, S32, (), , "() "
+DefineEngineMethod(GuiParticleGraphCtrl, getSelectedPlot, S32, (), , "() "
               "Gets the selected Plot (a.k.a. graph).\n"
            "@return The plot's ID.")
 {
   return object->getSelectedPlot();
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getSelectedPoint, S32, (), , "()"
+DefineEngineMethod(GuiParticleGraphCtrl, getSelectedPoint, S32, (), , "()"
               "Gets the selected Point on the Plot (a.k.a. graph)."
            "@return The last selected point ID")
 {
    return object->getSelectedPoint();
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S32 samples), , "(int plotID, int samples)"
+DefineEngineMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S32 samples), , "(int plotID, int samples)"
               "@return Returns true or false whether or not the point in the plot passed is an existing point.")
 {
 
@@ -1119,7 +1119,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, isExistingPoint, bool, (S32 plotID, S3
    return object->isExistingPoint(plotID, samples);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S32 samples), , "(int plotID, int samples)"
+DefineEngineMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S32 samples), , "(int plotID, int samples)"
               "Get a data point from the plot specified, samples from the start of the graph."
            "@return The data point ID")
 {
@@ -1137,7 +1137,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getPlotPoint, Point2F, (S32 plotID, S3
    return object->getPlotPoint(plotID, samples);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x, F32 y), , "(int plotID, float x, float y)\n"
+DefineEngineMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x, F32 y), , "(int plotID, float x, float y)\n"
               "Gets the index of the point passed on the plotID passed (graph ID).\n"
            "@param plotID The plot you wish to check.\n"
            "@param x,y The coordinates of the point to get.\n"
@@ -1151,7 +1151,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getPlotIndex, S32, (S32 plotID, F32 x,
    return object->getPlotIndex(plotID, x, y);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (S32 plotID), , "(int plotID)"
+DefineEngineMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (S32 plotID), , "(int plotID)"
               "Get the color of the graph passed."
            "@return Returns the color of the graph as a string of RGB values formatted as \"R G B\"")
 {
@@ -1165,7 +1165,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphColor, LinearColorF, (S32 plot
    
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), , "(int plotID) "
+DefineEngineMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), , "(int plotID) "
               "Get the minimum values of the graph ranges.\n"
            "@return Returns the minimum of the range formatted as \"x-min y-min\"")
 {
@@ -1177,7 +1177,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMin, Point2F, (S32 plotID), ,
    return object->getGraphMin(plotID);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), , "(int plotID) "
+DefineEngineMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), , "(int plotID) "
            "Get the maximum values of the graph ranges.\n"
            "@return Returns the maximum of the range formatted as \"x-max y-max\"")
 {
@@ -1190,7 +1190,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphMax, Point2F, (S32 plotID), ,
     
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID), , "(int plotID) "
+DefineEngineMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID), , "(int plotID) "
               "Get the name of the graph passed.\n"
            "@return Returns the name of the plot")
 {
@@ -1207,7 +1207,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, getGraphName, const char*, (S32 plotID
    return retBuffer;
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 minX, F32 minY), , "(int plotID, float minX, float minY) "
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 minX, F32 minY), , "(int plotID, float minX, float minY) "
            "Set the min values of the graph of plotID.\n"
            "@param plotID The plot to modify\n"
            "@param minX,minY The minimum bound of the value range.\n"
@@ -1223,7 +1223,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMin, void, (S32 plotID, F32 mi
    object->setGraphMin(plotID, Point2F(minX, minY));
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 minX), , "(int plotID, float minX) "
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 minX), , "(int plotID, float minX) "
            "Set the min X value of the graph of plotID.\n"
            "@param plotID The plot to modify.\n"
            "@param minX The minimum x value.\n"
@@ -1239,7 +1239,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinX, void, (S32 plotID, F32 m
    object->setGraphMinX(plotID, minX);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 minX), , "(int plotID, float minY) "
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 minX), , "(int plotID, float minY) "
            "Set the min Y value of the graph of plotID."
            "@param plotID The plot to modify.\n"
            "@param minY The minimum y value.\n"
@@ -1255,7 +1255,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMinY, void, (S32 plotID, F32 m
    object->setGraphMinY(plotID, minX);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 maxX, F32 maxY), , "(int plotID, float maxX, float maxY) "
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 maxX, F32 maxY), , "(int plotID, float maxX, float maxY) "
            "Set the max values of the graph of plotID."
            "@param plotID The plot to modify\n"
            "@param maxX,maxY The maximum bound of the value range.\n"
@@ -1271,7 +1271,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMax, void, (S32 plotID, F32 ma
    object->setGraphMax(plotID, Point2F(maxX, maxY));
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 maxX), , "(int plotID, float maxX)"
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 maxX), , "(int plotID, float maxX)"
            "Set the max X value of the graph of plotID."
            "@param plotID The plot to modify.\n"
            "@param maxX The maximum x value.\n"
@@ -1287,7 +1287,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxX, void, (S32 plotID, F32 m
    object->setGraphMaxX(plotID, maxX);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 maxX), , "(int plotID, float maxY)"
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 maxX), , "(int plotID, float maxY)"
            "Set the max Y value of the graph of plotID."
            "@param plotID The plot to modify.\n"
            "@param maxY The maximum y value.\n"
@@ -1303,7 +1303,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphMaxY, void, (S32 plotID, F32 m
    object->setGraphMaxY(plotID, maxX);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, bool isHidden), , "(int plotID, bool isHidden)"
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, bool isHidden), , "(int plotID, bool isHidden)"
            "Set whether the graph number passed is hidden or not."
            "@return No return value.")
 {
@@ -1317,7 +1317,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphHidden, void, (S32 plotID, boo
    object->setGraphHidden(plotID, isHidden);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax), , "(bool autoMax) "
+DefineEngineMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax), , "(bool autoMax) "
            "Set whether the max will automatically be set when adding points "
            "(ie if you add a value over the current max, the max is increased to that value).\n"
            "@return No return value.")
@@ -1325,35 +1325,35 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setAutoGraphMax, void, (bool autoMax),
    object->setAutoGraphMax(autoMax);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setAutoRemove, void, (bool autoRemove), , "(bool autoRemove) "
+DefineEngineMethod(GuiParticleGraphCtrl, setAutoRemove, void, (bool autoRemove), , "(bool autoRemove) "
            "Set whether or not a point should be deleted when you drag another one over it."
            "@return No return value.")
 {
    object->setAutoRemove(autoRemove);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setRenderAll, void, (bool autoRemove), , "(bool renderAll)"
+DefineEngineMethod(GuiParticleGraphCtrl, setRenderAll, void, (bool autoRemove), , "(bool renderAll)"
            "Set whether or not a position should be rendered on every point or just the last selected."
            "@return No return value.")
 {
    object->setRenderAll(autoRemove);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setPointXMovementClamped, void, (bool autoRemove), , "(bool clamped)"
+DefineEngineMethod(GuiParticleGraphCtrl, setPointXMovementClamped, void, (bool autoRemove), , "(bool clamped)"
            "Set whether the x position of the selected graph point should be clamped"
            "@return No return value.")
 {
    object->setPointXMovementClamped(autoRemove);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setRenderGraphTooltip, void, (bool autoRemove), , "(bool renderGraphTooltip)"
+DefineEngineMethod(GuiParticleGraphCtrl, setRenderGraphTooltip, void, (bool autoRemove), , "(bool renderGraphTooltip)"
            "Set whether or not to render the graph tooltip."
            "@return No return value.")
 {
    object->setRenderGraphTooltip(autoRemove);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const char * graphName), , "(int plotID, string graphName) "
+DefineEngineMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const char * graphName), , "(int plotID, string graphName) "
            "Set the name of the given plot.\n"
            "@param plotID The plot to modify.\n"
            "@param graphName The name to set on the plot.\n"
@@ -1369,7 +1369,7 @@ DefineConsoleMethod(GuiParticleGraphCtrl, setGraphName, void, (S32 plotID, const
    object->setGraphName(plotID, graphName);
 }
 
-DefineConsoleMethod(GuiParticleGraphCtrl, resetSelectedPoint, void, (), , "()"
+DefineEngineMethod(GuiParticleGraphCtrl, resetSelectedPoint, void, (), , "()"
            "This will reset the currently selected point to nothing."
            "@return No return value.")
 {

+ 5 - 4
Engine/source/gui/editor/inspector/componentGroup.cpp

@@ -469,7 +469,7 @@ void GuiInspectorComponentGroup::onRightMouseUp(const GuiEvent &event)
       Con::executef(this, "onRightMouseUp", event.mousePoint);
 }
 
-ConsoleMethod(GuiInspectorComponentGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
+DefineEngineMethod(GuiInspectorComponentGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
 {
    return object->inspectGroup();
 }
@@ -515,16 +515,17 @@ AbstractClassRep::Field* GuiInspectorComponentGroup::findObjectBehaviorField(Com
    }
    return NULL;
 }
-ConsoleMethod(GuiInspectorComponentGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();")
+
+DefineEngineMethod(GuiInspectorComponentGroup, addDynamicField, void, (), , "obj.addDynamicField();")
 {
    object->addDynamicField();
 }
 
-ConsoleMethod(GuiInspectorComponentGroup, removeDynamicField, void, 3, 3, "")
+DefineEngineMethod(GuiInspectorComponentGroup, removeDynamicField, void, (), , "")
 {
 }
 
-DefineConsoleMethod(GuiInspectorComponentGroup, getComponent, S32, (), ,"")
+DefineEngineMethod(GuiInspectorComponentGroup, getComponent, S32, (), , "")
 {
    return object->getComponent()->getId();
 }

+ 1 - 1
Engine/source/gui/editor/inspector/dynamicField.cpp

@@ -316,7 +316,7 @@ void GuiInspectorDynamicField::_executeSelectedCallback()
       Con::executef( mInspector, "onFieldSelected", mDynField->slotName, "TypeDynamicField" );
 }
 
-DefineConsoleMethod( GuiInspectorDynamicField, renameField, void, (const char* newDynamicFieldName),, "field.renameField(newDynamicFieldName);" )
+DefineEngineMethod( GuiInspectorDynamicField, renameField, void, (const char* newDynamicFieldName),, "field.renameField(newDynamicFieldName);" )
 {
    object->renameField( newDynamicFieldName );
 }

+ 3 - 3
Engine/source/gui/editor/inspector/dynamicGroup.cpp

@@ -188,7 +188,7 @@ void GuiInspectorDynamicGroup::updateAllFields()
    inspectGroup();
 }
 
-DefineConsoleMethod(GuiInspectorDynamicGroup, inspectGroup, bool, (), , "Refreshes the dynamic fields in the inspector.")
+DefineEngineMethod(GuiInspectorDynamicGroup, inspectGroup, bool, (), , "Refreshes the dynamic fields in the inspector.")
 {
    return object->inspectGroup();
 }
@@ -263,11 +263,11 @@ void GuiInspectorDynamicGroup::addDynamicField()
    instantExpand();
 }
 
-DefineConsoleMethod( GuiInspectorDynamicGroup, addDynamicField, void, (), , "obj.addDynamicField();" )
+DefineEngineMethod( GuiInspectorDynamicGroup, addDynamicField, void, (), , "obj.addDynamicField();" )
 {
    object->addDynamicField();
 }
 
-DefineConsoleMethod( GuiInspectorDynamicGroup, removeDynamicField, void, (), , "" )
+DefineEngineMethod( GuiInspectorDynamicGroup, removeDynamicField, void, (), , "" )
 {
 }

+ 5 - 3
Engine/source/gui/editor/inspector/entityGroup.cpp

@@ -87,7 +87,8 @@ void GuiInspectorEntityGroup::onMouseMove(const GuiEvent &event)
 {
    //mParent->mOverDivider = false;
 }
-ConsoleMethod(GuiInspectorEntityGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
+
+DefineEngineMethod(GuiInspectorEntityGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
 {
    return object->inspectGroup();
 }
@@ -128,11 +129,12 @@ AbstractClassRep::Field* GuiInspectorEntityGroup::findObjectBehaviorField(Compon
    }
    return NULL;
 }
-ConsoleMethod(GuiInspectorEntityGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();")
+
+DefineEngineMethod(GuiInspectorEntityGroup, addDynamicField, void, (), , "obj.addDynamicField();")
 {
    object->addDynamicField();
 }
 
-ConsoleMethod(GuiInspectorEntityGroup, removeDynamicField, void, 3, 3, "")
+DefineEngineMethod(GuiInspectorEntityGroup, removeDynamicField, void, (), , "")
 {
 }

+ 9 - 9
Engine/source/gui/editor/inspector/field.cpp

@@ -688,59 +688,59 @@ void GuiInspectorField::_setFieldDocs( StringTableEntry docs )
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, getInspector, S32, (), , "() - Return the GuiInspector to which this field belongs." )
+DefineEngineMethod( GuiInspectorField, getInspector, S32, (), , "() - Return the GuiInspector to which this field belongs." )
 {
    return object->getInspector()->getId();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, getInspectedFieldName, const char*, (), , "() - Return the name of the field edited by this inspector field." )
+DefineEngineMethod( GuiInspectorField, getInspectedFieldName, const char*, (), , "() - Return the name of the field edited by this inspector field." )
 {
    return object->getFieldName();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, getInspectedFieldType, const char*, (), , "() - Return the type of the field edited by this inspector field." )
+DefineEngineMethod( GuiInspectorField, getInspectedFieldType, const char*, (), , "() - Return the type of the field edited by this inspector field." )
 {
    return object->getFieldType();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, apply, void, ( const char * newValue, bool callbacks ), (true), "( string newValue, bool callbacks=true ) - Set the field's value. Suppress callbacks for undo if callbacks=false." )
+DefineEngineMethod( GuiInspectorField, apply, void, ( const char * newValue, bool callbacks ), (true), "( string newValue, bool callbacks=true ) - Set the field's value. Suppress callbacks for undo if callbacks=false." )
 {
    object->setData( newValue, callbacks );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, applyWithoutUndo, void, (const char * data), , "() - Set field value without recording undo (same as 'apply( value, false )')." )
+DefineEngineMethod( GuiInspectorField, applyWithoutUndo, void, (const char * data), , "() - Set field value without recording undo (same as 'apply( value, false )')." )
 {
    object->setData( data, false );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, getData, const char*, (), , "() - Return the value currently displayed on the field." )
+DefineEngineMethod( GuiInspectorField, getData, const char*, (), , "() - Return the value currently displayed on the field." )
 {
    return object->getData();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspectorField, reset, void, (), , "() - Reset to default value." )
+DefineEngineMethod( GuiInspectorField, reset, void, (), , "() - Reset to default value." )
 {
    object->resetData();
 }
 
-DefineConsoleMethod(GuiInspectorField, setCaption, void, (String newCaption),, "() - Reset to default value.")
+DefineEngineMethod(GuiInspectorField, setCaption, void, (String newCaption),, "() - Reset to default value.")
 {
    object->setCaption(StringTable->insert(newCaption.c_str()));
 }
 
-DefineConsoleMethod(GuiInspectorField, setEditControl, void, (GuiControl* editCtrl), (nullAsType<GuiControl*>()), "() - Reset to default value.")
+DefineEngineMethod(GuiInspectorField, setEditControl, void, (GuiControl* editCtrl), (nullAsType<GuiControl*>()), "() - Reset to default value.")
 {
    object->setEditControl(editCtrl);
 }

+ 5 - 3
Engine/source/gui/editor/inspector/mountingGroup.cpp

@@ -242,7 +242,8 @@ void GuiInspectorMountingGroup::onMouseMove(const GuiEvent &event)
 	//mParent->mOverDivider = false;
 	bool test = false;
 }
-ConsoleMethod(GuiInspectorMountingGroup, inspectGroup, bool, 2, 2, "Refreshes the dynamic fields in the inspector.")
+
+DefineEngineMethod(GuiInspectorMountingGroup, inspectGroup, bool, (),, "Refreshes the dynamic fields in the inspector.")
 {
    return object->inspectGroup();
 }
@@ -319,12 +320,13 @@ AbstractClassRep::Field* GuiInspectorMountingGroup::findObjectComponentField(Com
    }
    return NULL;
 }
-ConsoleMethod( GuiInspectorMountingGroup, addDynamicField, void, 2, 2, "obj.addDynamicField();" )
+
+DefineEngineMethod(GuiInspectorMountingGroup, addDynamicField, void, (), , "obj.addDynamicField();")
 {
    object->addDynamicField();
 }
 
-ConsoleMethod( GuiInspectorMountingGroup, removeDynamicField, void, 3, 3, "" )
+DefineEngineMethod(GuiInspectorMountingGroup, removeDynamicField, void, (), , "")
 {
 }
 

+ 2 - 2
Engine/source/gui/editor/inspector/variableGroup.cpp

@@ -250,12 +250,12 @@ GuiInspectorField* GuiInspectorVariableGroup::createInspectorField()
    return NULL;
 }
 
-DefineConsoleMethod(GuiInspectorVariableGroup, createInspectorField, GuiInspectorField*, (),, "createInspectorField()")
+DefineEngineMethod(GuiInspectorVariableGroup, createInspectorField, GuiInspectorField*, (),, "createInspectorField()")
 {
    return object->createInspectorField();
 }
 
-DefineConsoleMethod(GuiInspectorVariableGroup, addInspectorField, void, (GuiInspectorField* field), (nullAsType<GuiInspectorField*>()), "addInspectorField( GuiInspectorFieldObject )")
+DefineEngineMethod(GuiInspectorVariableGroup, addInspectorField, void, (GuiInspectorField* field), (nullAsType<GuiInspectorField*>()), "addInspectorField( GuiInspectorFieldObject )")
 {
    object->addInspectorField(field);
 }

+ 8 - 8
Engine/source/gui/editor/inspector/variableInspector.cpp

@@ -216,17 +216,17 @@ void GuiVariableInspector::setFieldEnabled(const char* name, bool enabled)
    }
 }
 
-DefineConsoleMethod(GuiVariableInspector, startGroup, void, (const char* name),, "startGroup( groupName )")
+DefineEngineMethod(GuiVariableInspector, startGroup, void, (const char* name),, "startGroup( groupName )")
 {
    object->startGroup(name);
 }
 
-DefineConsoleMethod(GuiVariableInspector, endGroup, void, (),, "endGroup()")
+DefineEngineMethod(GuiVariableInspector, endGroup, void, (),, "endGroup()")
 {
    object->endGroup();
 }
 
-DefineConsoleMethod(GuiVariableInspector, addField, void, (const char* name, const char* label, const char* typeName, 
+DefineEngineMethod(GuiVariableInspector, addField, void, (const char* name, const char* label, const char* typeName, 
    const char* description, const char* defaultValue, const char* dataValues, SimObject* ownerObj),
    ("","","","","", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, ownerObject )")
 {
@@ -236,7 +236,7 @@ DefineConsoleMethod(GuiVariableInspector, addField, void, (const char* name, con
    object->addField(name, label, typeName, description, defaultValue, dataValues, ownerObj);
 }
 
-DefineConsoleMethod(GuiVariableInspector, addCallbackField, void, (const char* name, const char* label, const char* typeName,
+DefineEngineMethod(GuiVariableInspector, addCallbackField, void, (const char* name, const char* label, const char* typeName,
    const char* description, const char* defaultValue, const char* dataValues, const char* callbackName, SimObject* ownerObj),
    ("", "", "", "", "", "", nullAsType<SimObject*>()), "addField( fieldName/varName, fieldLabel, fieldTypeName, description, defaultValue, defaultValues, callbackName, ownerObject )")
 {
@@ -246,22 +246,22 @@ DefineConsoleMethod(GuiVariableInspector, addCallbackField, void, (const char* n
    object->addCallbackField(name, label, typeName, description, defaultValue, dataValues, callbackName, ownerObj);
 }
 
-DefineConsoleMethod(GuiVariableInspector, update, void, (), , "update()")
+DefineEngineMethod(GuiVariableInspector, update, void, (), , "update()")
 {
    object->update();
 }
 
-DefineConsoleMethod(GuiVariableInspector, clearFields, void, (), , "clearFields()")
+DefineEngineMethod(GuiVariableInspector, clearFields, void, (), , "clearFields()")
 {
    object->clearFields();
 }
 
-DefineConsoleMethod(GuiVariableInspector, setFieldEnabled, void, (const char* fieldName, bool isEnabled), (true), "setFieldEnabled( fieldName, isEnabled )")
+DefineEngineMethod(GuiVariableInspector, setFieldEnabled, void, (const char* fieldName, bool isEnabled), (true), "setFieldEnabled( fieldName, isEnabled )")
 {
    object->setFieldEnabled(fieldName, isEnabled);
 }
 
-DefineConsoleMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
+DefineEngineMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
 {
    object->loadVars( searchString );
 }

+ 10 - 10
Engine/source/gui/editor/popupMenu.cpp

@@ -456,17 +456,17 @@ void PopupMenu::hidePopupSubmenus()
 //-----------------------------------------------------------------------------
 // Console Methods
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator, const char* cmd), ("", "", ""), "(pos[, title][, accelerator][, cmd])")
+DefineEngineMethod(PopupMenu, insertItem, S32, (S32 pos, const char * title, const char * accelerator, const char* cmd), ("", "", ""), "(pos[, title][, accelerator][, cmd])")
 {
    return object->insertItem(pos, title, accelerator, cmd);
 }
 
-DefineConsoleMethod(PopupMenu, removeItem, void, (S32 pos), , "(pos)")
+DefineEngineMethod(PopupMenu, removeItem, void, (S32 pos), , "(pos)")
 {
    object->removeItem(pos);
 }
 
-DefineConsoleMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, String subMenu), , "(pos, title, subMenu)")
+DefineEngineMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, String subMenu), , "(pos, title, subMenu)")
 {
    PopupMenu *mnu = dynamic_cast<PopupMenu *>(Sim::findObject(subMenu));
    if(mnu == NULL)
@@ -477,34 +477,34 @@ DefineConsoleMethod(PopupMenu, insertSubMenu, S32, (S32 pos, String title, Strin
    return object->insertSubMenu(pos, title, mnu);
 }
 
-DefineConsoleMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator, const char *cmd), (""), "(pos, title[, accelerator][, cmd])")
+DefineEngineMethod(PopupMenu, setItem, bool, (S32 pos, const char * title, const char * accelerator, const char *cmd), (""), "(pos, title[, accelerator][, cmd])")
 {
    return object->setItem(pos, title, accelerator, cmd);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(PopupMenu, enableItem, void, (S32 pos, bool enabled), , "(pos, enabled)")
+DefineEngineMethod(PopupMenu, enableItem, void, (S32 pos, bool enabled), , "(pos, enabled)")
 {
    object->enableItem(pos, enabled);
 }
 
-DefineConsoleMethod(PopupMenu, checkItem, void, (S32 pos, bool checked), , "(pos, checked)")
+DefineEngineMethod(PopupMenu, checkItem, void, (S32 pos, bool checked), , "(pos, checked)")
 {
    object->checkItem(pos, checked);
 }
 
-DefineConsoleMethod(PopupMenu, checkRadioItem, void, (S32 firstPos, S32 lastPos, S32 checkPos), , "(firstPos, lastPos, checkPos)")
+DefineEngineMethod(PopupMenu, checkRadioItem, void, (S32 firstPos, S32 lastPos, S32 checkPos), , "(firstPos, lastPos, checkPos)")
 {
    object->checkRadioItem(firstPos, lastPos, checkPos);
 }
 
-DefineConsoleMethod(PopupMenu, isItemChecked, bool, (S32 pos), , "(pos)")
+DefineEngineMethod(PopupMenu, isItemChecked, bool, (S32 pos), , "(pos)")
 {
    return object->isItemChecked(pos);
 }
 
-DefineConsoleMethod(PopupMenu, getItemCount, S32, (), , "()")
+DefineEngineMethod(PopupMenu, getItemCount, S32, (), , "()")
 {
    return object->getItemCount();
 }
@@ -515,7 +515,7 @@ DefineConsoleMethod(PopupMenu, clearItems, void, (), , "()")
 }
 
 //-----------------------------------------------------------------------------
-DefineConsoleMethod(PopupMenu, showPopup, void, (const char * canvasName, S32 x, S32 y), ( -1, -1), "(Canvas,[x, y])")
+DefineEngineMethod(PopupMenu, showPopup, void, (const char * canvasName, S32 x, S32 y), ( -1, -1), "(Canvas,[x, y])")
 {
    GuiCanvas *pCanvas = dynamic_cast<GuiCanvas*>(Sim::findObject(canvasName));
    object->showPopup(pCanvas, x, y);

+ 2 - 2
Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp

@@ -177,13 +177,13 @@ ConsoleDocClass( GuiIdleCamFadeBitmapCtrl,
 				"This is going to be deprecated, and any useful code ported to FadeinBitmap\n\n"
 				"@internal");
 
-DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
+DefineEngineMethod(GuiIdleCamFadeBitmapCtrl, fadeIn, void, (), , "()"
 			  "@internal")
 {
    object->fadeIn();
 }
 
-DefineConsoleMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
+DefineEngineMethod(GuiIdleCamFadeBitmapCtrl, fadeOut, void, (), , "()"
 			  "@internal")
 {
    object->fadeOut();

+ 1 - 1
Engine/source/gui/shiny/guiTickCtrl.cpp

@@ -59,7 +59,7 @@ static ConsoleDocFragment _setProcessTicks(
    "void setProcessTicks( bool tick )"
 );
 
-DefineConsoleMethod( GuiTickCtrl, setProcessTicks, void, (bool tick), (true), "( [tick = true] ) - This will set this object to either be processing ticks or not" )
+DefineEngineMethod( GuiTickCtrl, setProcessTicks, void, (bool tick), (true), "( [tick = true] ) - This will set this object to either be processing ticks or not" )
 {
    object->setProcessTicks(tick);
 }

+ 1 - 1
Engine/source/gui/utility/messageVector.cpp

@@ -258,7 +258,7 @@ static ConsoleDocFragment _MessageVectordump2(
    "MessageVector",
    "void dump( string filename, string header);");
 
-DefineConsoleMethod( MessageVector, dump, void, (const char * filename, const char * header), (""), "(string filename, string header=NULL)"
+DefineEngineMethod( MessageVector, dump, void, (const char * filename, const char * header), (""), "(string filename, string header=NULL)"
               "Dump the message vector to a file, optionally prefixing a header."
 			  "@hide")
 {

+ 9 - 9
Engine/source/gui/worldEditor/creator.cpp

@@ -219,7 +219,7 @@ void CreatorTree::sort()
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( CreatorTree, addGroup, S32, (S32 group, const char * name, const char * value), , "(string group, string name, string value)")
+DefineEngineMethod( CreatorTree, addGroup, S32, (S32 group, const char * name, const char * value), , "(string group, string name, string value)")
 {
    CreatorTree::Node * grp = object->findNode(group);
 
@@ -236,7 +236,7 @@ DefineConsoleMethod( CreatorTree, addGroup, S32, (S32 group, const char * name,
    return(node ? node->getId() : -1);
 }
 
-DefineConsoleMethod( CreatorTree, addItem, S32, (S32 group, const char * name, const char * value), , "(Node group, string name, string value)")
+DefineEngineMethod( CreatorTree, addItem, S32, (S32 group, const char * name, const char * value), , "(Node group, string name, string value)")
 {
    CreatorTree::Node * grp = object->findNode(group);
 
@@ -249,7 +249,7 @@ DefineConsoleMethod( CreatorTree, addItem, S32, (S32 group, const char * name, c
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)")
+DefineEngineMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)")
 {
    // argv[2] - world short
    // argv[3] - type short
@@ -269,12 +269,12 @@ DefineConsoleMethod( CreatorTree, fileNameMatch, bool, (const char * world, cons
    return(!dStrnicmp(filename+1, type, typeLen));
 }
 
-DefineConsoleMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.")
+DefineEngineMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.")
 {
    return(object->getSelected());
 }
 
-DefineConsoleMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group g)")
+DefineEngineMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group g)")
 {
    CreatorTree::Node * node = object->findNode(dAtoi(group));
    if(node && node->isGroup())
@@ -282,24 +282,24 @@ DefineConsoleMethod( CreatorTree, isGroup, bool, (const char * group), , "(Group
    return(false);
 }
 
-DefineConsoleMethod( CreatorTree, getName, const char*, (const char * item), , "(Node item)")
+DefineEngineMethod( CreatorTree, getName, const char*, (const char * item), , "(Node item)")
 {
    CreatorTree::Node * node = object->findNode(dAtoi(item));
    return(node ? node->mName : 0);
 }
 
-DefineConsoleMethod( CreatorTree, getValue, const char*, (S32 nodeValue), , "(Node n)")
+DefineEngineMethod( CreatorTree, getValue, const char*, (S32 nodeValue), , "(Node n)")
 {
    CreatorTree::Node * node = object->findNode(nodeValue);
    return(node ? node->mValue : 0);
 }
 
-DefineConsoleMethod( CreatorTree, clear, void, (), , "Clear the tree.")
+DefineEngineMethod( CreatorTree, clear, void, (), , "Clear the tree.")
 {
    object->clear();
 }
 
-DefineConsoleMethod( CreatorTree, getParent, S32, (S32 nodeValue), , "(Node n)")
+DefineEngineMethod( CreatorTree, getParent, S32, (S32 nodeValue), , "(Node n)")
 {
    CreatorTree::Node * node = object->findNode(nodeValue);
    if(node && node->mParent)

+ 5 - 5
Engine/source/gui/worldEditor/editor.cpp

@@ -128,7 +128,7 @@ static GameBase * getControlObj()
    return(control);
 }
 
-DefineConsoleMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
+DefineEngineMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
 {
    if(val < 0 || val > 9)
       return;
@@ -138,7 +138,7 @@ DefineConsoleMethod( EditManager, setBookmark, void, (S32 val), , "(int slot)")
       object->mBookmarks[val] = control->getTransform();
 }
 
-DefineConsoleMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
+DefineEngineMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
 {
    if(val < 0 || val > 9)
       return;
@@ -148,17 +148,17 @@ DefineConsoleMethod( EditManager, gotoBookmark, void, (S32 val), , "(int slot)")
       control->setTransform(object->mBookmarks[val]);
 }
 
-DefineConsoleMethod( EditManager, editorEnabled, void, (), , "Perform the onEditorEnabled callback on all SimObjects and set gEditingMission true" )
+DefineEngineMethod( EditManager, editorEnabled, void, (), , "Perform the onEditorEnabled callback on all SimObjects and set gEditingMission true" )
 {
    object->editorEnabled();
 }
 
-DefineConsoleMethod( EditManager, editorDisabled, void, (), , "Perform the onEditorDisabled callback on all SimObjects and set gEditingMission false" )
+DefineEngineMethod( EditManager, editorDisabled, void, (), , "Perform the onEditorDisabled callback on all SimObjects and set gEditingMission false" )
 {
    object->editorDisabled();
 }
 
-DefineConsoleMethod( EditManager, isEditorEnabled, bool, (), , "Return the value of gEditingMission." )
+DefineEngineMethod( EditManager, isEditorEnabled, bool, (), , "Return the value of gEditingMission." )
 {
    return gEditingMission;
 }

+ 14 - 21
Engine/source/gui/worldEditor/editorIconRegistry.cpp

@@ -23,7 +23,7 @@
 #include "platform/platform.h"
 #include "gui/worldEditor/editorIconRegistry.h"
 
-#include "console/console.h"
+#include "console/engineAPI.h"
 #include "console/simBase.h"
 
 
@@ -36,6 +36,8 @@ ConsoleDoc(
    "@internal"
 );
 
+IMPLEMENT_STATIC_CLASS(EditorIconRegistry,, "");
+
 EditorIconRegistry::EditorIconRegistry()
 {
 }
@@ -168,51 +170,42 @@ void EditorIconRegistry::clear()
    mDefaultIcon.free();
 }
 
-ConsoleStaticMethod( EditorIconRegistry, add, void, 3, 4, "( String className, String imageFile [, bool overwrite = true] )"
+DefineEngineStaticMethod( EditorIconRegistry, add, void, (String className, String imageFile, bool overwrite), (true),
 					"@internal")
 {
-   bool overwrite = true;
-   if ( argc > 3 )
-      overwrite = dAtob( argv[3] );
-
-   gEditorIcons.add( argv[1], argv[2], overwrite );
+   gEditorIcons.add( className, imageFile, overwrite );
 }
 
-ConsoleStaticMethod( EditorIconRegistry, loadFromPath, void, 2, 3, "( String imagePath [, bool overwrite = true] )"
+DefineEngineStaticMethod( EditorIconRegistry, loadFromPath, void, (String imagePath, bool overwrite), (true),
 					"@internal")
 {
-   bool overwrite = true;
-   if ( argc > 2 )
-      overwrite = dAtob( argv[2] );
-
-   gEditorIcons.loadFromPath( argv[1], overwrite );
+   gEditorIcons.loadFromPath( imagePath, overwrite );
 }
 
-ConsoleStaticMethod( EditorIconRegistry, clear, void, 1, 1, "" 
+DefineEngineStaticMethod( EditorIconRegistry, clear, void, (),,
 					"@internal")
 {
    gEditorIcons.clear();
 }
 
-ConsoleStaticMethod( EditorIconRegistry, findIconByClassName, const char*, 2, 2, "( String className )\n"
-   "Returns the file path to the icon file if found." 
+DefineEngineStaticMethod( EditorIconRegistry, findIconByClassName, const char*, (String className),,
+   "@brief Returns the file path to the icon file if found." 
    "@internal")
 {
-   GFXTexHandle icon = gEditorIcons.findIcon( argv[1] );
+   GFXTexHandle icon = gEditorIcons.findIcon( className );
    if ( icon.isNull() )
       return NULL;
 
    return icon->mPath;
 }
 
-ConsoleStaticMethod( EditorIconRegistry, findIconBySimObject, const char*, 2, 2, "( SimObject )\n"
+DefineEngineStaticMethod( EditorIconRegistry, findIconBySimObject, const char*, (SimObject* obj),,
    "Returns the file path to the icon file if found." 
    "@internal")
 {
-   SimObject *obj = NULL;
-   if ( !Sim::findObject( argv[1], obj ) )
+   if ( !obj )
    {
-      Con::warnf( "EditorIconRegistry::findIcon, parameter %d was not a SimObject!", (const char*)argv[1] );
+      Con::warnf( "EditorIconRegistry::findIcon, parameter was not a SimObject!");
       return NULL;
    }
 

Some files were not shown because too many files changed in this diff