Eliminate DefineConsoleMethod

This commit is contained in:
Lukas Joergensen 2018-04-17 21:01:50 +02:00
parent 5bde18143f
commit 3c99ef73a9
77 changed files with 483 additions and 483 deletions

View file

@ -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)

View file

@ -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;
}

View file

@ -2179,43 +2179,43 @@ void GuiConvexEditorCtrl::splitSelectedFace()
updateGizmoPos();
}
DefineConsoleMethod( GuiConvexEditorCtrl, hollowSelection, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, hollowSelection, void, (), , "" )
{
object->hollowSelection();
}
DefineConsoleMethod( GuiConvexEditorCtrl, recenterSelection, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, recenterSelection, void, (), , "" )
{
object->recenterSelection();
}
DefineConsoleMethod( GuiConvexEditorCtrl, hasSelection, S32, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, hasSelection, S32, (), , "" )
{
return object->hasSelection();
}
DefineConsoleMethod( GuiConvexEditorCtrl, handleDelete, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, handleDelete, void, (), , "" )
{
object->handleDelete();
}
DefineConsoleMethod( GuiConvexEditorCtrl, handleDeselect, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, handleDeselect, void, (), , "" )
{
object->handleDeselect();
}
DefineConsoleMethod( GuiConvexEditorCtrl, dropSelectionAtScreenCenter, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, dropSelectionAtScreenCenter, void, (), , "" )
{
object->dropSelectionAtScreenCenter();
}
DefineConsoleMethod( GuiConvexEditorCtrl, selectConvex, void, (ConvexShape *convex), , "( ConvexShape )" )
DefineEngineMethod( GuiConvexEditorCtrl, selectConvex, void, (ConvexShape *convex), , "( ConvexShape )" )
{
if (convex)
object->setSelection( convex, -1 );
}
DefineConsoleMethod( GuiConvexEditorCtrl, splitSelectedFace, void, (), , "" )
DefineEngineMethod( GuiConvexEditorCtrl, splitSelectedFace, void, (), , "" )
{
object->splitSelectedFace();
}

View file

@ -784,12 +784,12 @@ void GuiDecalEditorCtrl::setMode( String mode, bool sourceShortcut = false )
Con::executef( this, "paletteSync", mMode );
}
DefineConsoleMethod( GuiDecalEditorCtrl, deleteSelectedDecal, void, (), , "deleteSelectedDecal()" )
DefineEngineMethod( GuiDecalEditorCtrl, deleteSelectedDecal, void, (), , "deleteSelectedDecal()" )
{
object->deleteSelectedDecal();
}
DefineConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const char * datablock ), , "deleteSelectedDecalDatablock( String datablock )" )
DefineEngineMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const char * datablock ), , "deleteSelectedDecalDatablock( String datablock )" )
{
String lookupName( datablock );
if( lookupName == String::EmptyString )
@ -798,22 +798,22 @@ DefineConsoleMethod( GuiDecalEditorCtrl, deleteDecalDatablock, void, ( const cha
object->deleteDecalDatablock( lookupName );
}
DefineConsoleMethod( GuiDecalEditorCtrl, setMode, void, ( String newMode ), , "setMode( String mode )()" )
DefineEngineMethod( GuiDecalEditorCtrl, setMode, void, ( String newMode ), , "setMode( String mode )()" )
{
object->setMode( newMode );
}
DefineConsoleMethod( GuiDecalEditorCtrl, getMode, const char*, (), , "getMode()" )
DefineEngineMethod( GuiDecalEditorCtrl, getMode, const char*, (), , "getMode()" )
{
return object->mMode;
}
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalCount, S32, (), , "getDecalCount()" )
DefineEngineMethod( GuiDecalEditorCtrl, getDecalCount, S32, (), , "getDecalCount()" )
{
return gDecalManager->mDecalInstanceVec.size();
}
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 id ), , "getDecalTransform()" )
DefineEngineMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 id ), , "getDecalTransform()" )
{
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
@ -835,7 +835,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, getDecalTransform, const char*, ( U32 i
return returnBuffer;
}
DefineConsoleMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32 id ), , "getDecalLookupName( S32 )()" )
DefineEngineMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32 id ), , "getDecalLookupName( S32 )()" )
{
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
if( decalInstance == NULL )
@ -844,7 +844,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, getDecalLookupName, const char*, ( U32
return decalInstance->mDataBlock->lookupName;
}
DefineConsoleMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selectDecal( S32 )()" )
DefineEngineMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selectDecal( S32 )()" )
{
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
if( decalInstance == NULL )
@ -853,7 +853,7 @@ DefineConsoleMethod( GuiDecalEditorCtrl, selectDecal, void, ( U32 id ), , "selec
object->selectDecal( decalInstance );
}
DefineConsoleMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point3F pos, Point3F tan,F32 size ), , "editDecalDetails( S32 )()" )
DefineEngineMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point3F pos, Point3F tan,F32 size ), , "editDecalDetails( S32 )()" )
{
DecalInstance *decalInstance = gDecalManager->mDecalInstanceVec[id];
if( decalInstance == NULL )
@ -872,14 +872,14 @@ DefineConsoleMethod( GuiDecalEditorCtrl, editDecalDetails, void, ( U32 id, Point
gDecalManager->notifyDecalModified( decalInstance );
}
DefineConsoleMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
DefineEngineMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
{
if ( object->mSELDecal != NULL )
return 1;
return 0;
}
DefineConsoleMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
DefineEngineMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
{
if( dStrcmp( dbFrom, "" ) != 0 && dStrcmp( dbTo, "" ) != 0 )
object->retargetDecalDatablock( dbFrom, dbTo );

View file

@ -95,7 +95,7 @@ void GuiMissionAreaEditorCtrl::setSelectedMissionArea( MissionArea *missionArea
Con::executef( this, "onMissionAreaSelected" );
}
DefineConsoleMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
DefineEngineMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
{
if ( dStrcmp( missionAreaName, "" )==0 )
object->setSelectedMissionArea(NULL);
@ -107,7 +107,7 @@ DefineConsoleMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (co
}
}
DefineConsoleMethod( GuiMissionAreaEditorCtrl, getSelectedMissionArea, const char*, (), , "" )
DefineEngineMethod( GuiMissionAreaEditorCtrl, getSelectedMissionArea, const char*, (), , "" )
{
MissionArea *missionArea = object->getSelectedMissionArea();
if ( !missionArea )

View file

@ -88,35 +88,35 @@ void GuiTerrPreviewCtrl::initPersistFields()
}
DefineConsoleMethod( GuiTerrPreviewCtrl, reset, void, (), , "Reset the view of the terrain.")
DefineEngineMethod( GuiTerrPreviewCtrl, reset, void, (), , "Reset the view of the terrain.")
{
object->reset();
}
DefineConsoleMethod( GuiTerrPreviewCtrl, setRoot, void, (), , "Add the origin to the root and reset the origin.")
DefineEngineMethod( GuiTerrPreviewCtrl, setRoot, void, (), , "Add the origin to the root and reset the origin.")
{
object->setRoot();
}
DefineConsoleMethod( GuiTerrPreviewCtrl, getRoot, Point2F, (), , "Return a Point2F representing the position of the root.")
DefineEngineMethod( GuiTerrPreviewCtrl, getRoot, Point2F, (), , "Return a Point2F representing the position of the root.")
{
return object->getRoot();
}
DefineConsoleMethod( GuiTerrPreviewCtrl, setOrigin, void, (Point2F pos), , "(float x, float y)"
DefineEngineMethod( GuiTerrPreviewCtrl, setOrigin, void, (Point2F pos), , "(float x, float y)"
"Set the origin of the view.")
{
object->setOrigin( pos );
}
DefineConsoleMethod( GuiTerrPreviewCtrl, getOrigin, Point2F, (), , "Return a Point2F containing the position of the origin.")
DefineEngineMethod( GuiTerrPreviewCtrl, getOrigin, Point2F, (), , "Return a Point2F containing the position of the origin.")
{
return object->getOrigin();
}
DefineConsoleMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a 4-tuple containing: root_x root_y origin_x origin_y")
DefineEngineMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a 4-tuple containing: root_x root_y origin_x origin_y")
{
Point2F r = object->getRoot();
Point2F o = object->getOrigin();
@ -126,7 +126,7 @@ DefineConsoleMethod( GuiTerrPreviewCtrl, getValue, const char*, (), , "Returns a
return valuebuf;
}
DefineConsoleMethod( GuiTerrPreviewCtrl, setValue, void, (const char * tuple), , "Accepts a 4-tuple in the same form as getValue returns.\n\n"
DefineEngineMethod( GuiTerrPreviewCtrl, setValue, void, (const char * tuple), , "Accepts a 4-tuple in the same form as getValue returns.\n\n"
"@see GuiTerrPreviewCtrl::getValue()")
{
Point2F r,o;

View file

@ -795,7 +795,7 @@ void TerrainSmoothAction::smooth( TerrainBlock *terrain, F32 factor, U32 steps )
redo();
}
DefineConsoleMethod( TerrainSmoothAction, smooth, void, ( TerrainBlock *terrain, F32 factor, U32 steps ), , "( TerrainBlock obj, F32 factor, U32 steps )")
DefineEngineMethod( TerrainSmoothAction, smooth, void, ( TerrainBlock *terrain, F32 factor, U32 steps ), , "( TerrainBlock obj, F32 factor, U32 steps )")
{
if (terrain)
object->smooth( terrain, factor, mClamp( steps, 1, 13 ) );

View file

@ -2403,7 +2403,7 @@ void TerrainEditor::reorderMaterial( S32 index, S32 orderPos )
//------------------------------------------------------------------------------
DefineConsoleMethod( TerrainEditor, attachTerrain, void, (const char * terrain), (""), "(TerrainBlock terrain)")
DefineEngineMethod( TerrainEditor, attachTerrain, void, (const char * terrain), (""), "(TerrainBlock terrain)")
{
SimSet * missionGroup = dynamic_cast<SimSet*>(Sim::findObject("MissionGroup"));
if (!missionGroup)
@ -2459,12 +2459,12 @@ DefineConsoleMethod( TerrainEditor, attachTerrain, void, (const char * terrain),
}
}
DefineConsoleMethod( TerrainEditor, getTerrainBlockCount, S32, (), , "()")
DefineEngineMethod( TerrainEditor, getTerrainBlockCount, S32, (), , "()")
{
return object->getTerrainBlockCount();
}
DefineConsoleMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 index)")
DefineEngineMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 index)")
{
TerrainBlock* tb = object->getTerrainBlock(index);
if(!tb)
@ -2473,7 +2473,7 @@ DefineConsoleMethod( TerrainEditor, getTerrainBlock, S32, (S32 index), , "(S32 i
return tb->getId();
}
DefineConsoleMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (), , "() gets the list of current terrain materials for all terrain blocks.")
DefineEngineMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (), , "() gets the list of current terrain materials for all terrain blocks.")
{
Vector<StringTableEntry> list;
object->getTerrainBlocksMaterialList(list);
@ -2502,23 +2502,23 @@ DefineConsoleMethod(TerrainEditor, getTerrainBlocksMaterialList, const char *, (
return ret;
}
DefineConsoleMethod( TerrainEditor, setBrushType, void, (String type), , "(string type)"
DefineEngineMethod( TerrainEditor, setBrushType, void, (String type), , "(string type)"
"One of box, ellipse, selection.")
{
object->setBrushType(type);
}
DefineConsoleMethod( TerrainEditor, getBrushType, const char*, (), , "()")
DefineEngineMethod( TerrainEditor, getBrushType, const char*, (), , "()")
{
return object->getBrushType();
}
DefineConsoleMethod( TerrainEditor, setBrushSize, void, ( S32 w, S32 h), (0), "(int w [, int h])")
DefineEngineMethod( TerrainEditor, setBrushSize, void, ( S32 w, S32 h), (0), "(int w [, int h])")
{
object->setBrushSize( w, h==0?w:h );
}
DefineConsoleMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
DefineEngineMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
{
Point2I size = object->getBrushSize();
@ -2528,74 +2528,74 @@ DefineConsoleMethod( TerrainEditor, getBrushSize, const char*, (), , "()")
return ret;
}
DefineConsoleMethod( TerrainEditor, setBrushPressure, void, (F32 pressure), , "(float pressure)")
DefineEngineMethod( TerrainEditor, setBrushPressure, void, (F32 pressure), , "(float pressure)")
{
object->setBrushPressure( pressure );
}
DefineConsoleMethod( TerrainEditor, getBrushPressure, F32, (), , "()")
DefineEngineMethod( TerrainEditor, getBrushPressure, F32, (), , "()")
{
return object->getBrushPressure();
}
DefineConsoleMethod( TerrainEditor, setBrushSoftness, void, (F32 softness), , "(float softness)")
DefineEngineMethod( TerrainEditor, setBrushSoftness, void, (F32 softness), , "(float softness)")
{
object->setBrushSoftness( softness );
}
DefineConsoleMethod( TerrainEditor, getBrushSoftness, F32, (), , "()")
DefineEngineMethod( TerrainEditor, getBrushSoftness, F32, (), , "()")
{
return object->getBrushSoftness();
}
DefineConsoleMethod( TerrainEditor, getBrushPos, const char*, (), , "Returns a Point2I.")
DefineEngineMethod( TerrainEditor, getBrushPos, const char*, (), , "Returns a Point2I.")
{
return object->getBrushPos();
}
DefineConsoleMethod( TerrainEditor, setBrushPos, void, (Point2I pos), , "Location")
DefineEngineMethod( TerrainEditor, setBrushPos, void, (Point2I pos), , "Location")
{
object->setBrushPos(pos);
}
DefineConsoleMethod( TerrainEditor, setAction, void, (const char * action_name), , "(string action_name)")
DefineEngineMethod( TerrainEditor, setAction, void, (const char * action_name), , "(string action_name)")
{
object->setAction(action_name);
}
DefineConsoleMethod( TerrainEditor, getActionName, const char*, (U32 index), , "(int num)")
DefineEngineMethod( TerrainEditor, getActionName, const char*, (U32 index), , "(int num)")
{
return (object->getActionName(index));
}
DefineConsoleMethod( TerrainEditor, getNumActions, S32, (), , "")
DefineEngineMethod( TerrainEditor, getNumActions, S32, (), , "")
{
return(object->getNumActions());
}
DefineConsoleMethod( TerrainEditor, getCurrentAction, const char*, (), , "")
DefineEngineMethod( TerrainEditor, getCurrentAction, const char*, (), , "")
{
return object->getCurrentAction();
}
DefineConsoleMethod( TerrainEditor, resetSelWeights, void, (bool clear), , "(bool clear)")
DefineEngineMethod( TerrainEditor, resetSelWeights, void, (bool clear), , "(bool clear)")
{
object->resetSelWeights(clear);
}
DefineConsoleMethod( TerrainEditor, clearSelection, void, (), , "")
DefineEngineMethod( TerrainEditor, clearSelection, void, (), , "")
{
object->clearSelection();
}
DefineConsoleMethod( TerrainEditor, processAction, void, (String action), (""), "(string action=NULL)")
DefineEngineMethod( TerrainEditor, processAction, void, (String action), (""), "(string action=NULL)")
{
object->processAction(action);
}
DefineConsoleMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
DefineEngineMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
{
S32 ret = 0;
@ -2607,27 +2607,27 @@ DefineConsoleMethod( TerrainEditor, getActiveTerrain, S32, (), , "")
return ret;
}
DefineConsoleMethod( TerrainEditor, getNumTextures, S32, (), , "")
DefineEngineMethod( TerrainEditor, getNumTextures, S32, (), , "")
{
return object->getNumTextures();
}
DefineConsoleMethod( TerrainEditor, markEmptySquares, void, (), , "")
DefineEngineMethod( TerrainEditor, markEmptySquares, void, (), , "")
{
object->markEmptySquares();
}
DefineConsoleMethod( TerrainEditor, mirrorTerrain, void, (S32 mirrorIndex), , "")
DefineEngineMethod( TerrainEditor, mirrorTerrain, void, (S32 mirrorIndex), , "")
{
object->mirrorTerrain(mirrorIndex);
}
DefineConsoleMethod(TerrainEditor, setTerraformOverlay, void, (bool overlayEnable), , "(bool overlayEnable) - sets the terraformer current heightmap to draw as an overlay over the current terrain.")
DefineEngineMethod(TerrainEditor, setTerraformOverlay, void, (bool overlayEnable), , "(bool overlayEnable) - sets the terraformer current heightmap to draw as an overlay over the current terrain.")
{
// XA: This one needs to be implemented :)
}
DefineConsoleMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String matName ), ,
DefineEngineMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String matName ), ,
"( int index, string matName )\n"
"Changes the material name at the index." )
{
@ -2645,7 +2645,7 @@ DefineConsoleMethod(TerrainEditor, updateMaterial, bool, ( U32 index, String mat
return true;
}
DefineConsoleMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
DefineEngineMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
"( string matName )\n"
"Adds a new material." )
{
@ -2660,7 +2660,7 @@ DefineConsoleMethod(TerrainEditor, addMaterial, S32, ( String matName ), ,
return true;
}
DefineConsoleMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( int index ) - Remove the material at the given index." )
DefineEngineMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( int index ) - Remove the material at the given index." )
{
TerrainBlock *terr = object->getClientTerrain();
if ( !terr )
@ -2689,7 +2689,7 @@ DefineConsoleMethod( TerrainEditor, removeMaterial, void, ( S32 index ), , "( in
object->setGridUpdateMinMax();
}
DefineConsoleMethod(TerrainEditor, getMaterialCount, S32, (), ,
DefineEngineMethod(TerrainEditor, getMaterialCount, S32, (), ,
"Returns the current material count." )
{
TerrainBlock *terr = object->getClientTerrain();
@ -2699,7 +2699,7 @@ DefineConsoleMethod(TerrainEditor, getMaterialCount, S32, (), ,
return 0;
}
DefineConsoleMethod(TerrainEditor, getMaterials, const char *, (), , "() gets the list of current terrain materials.")
DefineEngineMethod(TerrainEditor, getMaterials, const char *, (), , "() gets the list of current terrain materials.")
{
TerrainBlock *terr = object->getClientTerrain();
if ( !terr )
@ -2716,7 +2716,7 @@ DefineConsoleMethod(TerrainEditor, getMaterials, const char *, (), , "() gets th
return ret;
}
DefineConsoleMethod( TerrainEditor, getMaterialName, const char*, (S32 index), , "( int index ) - Returns the name of the material at the given index." )
DefineEngineMethod( TerrainEditor, getMaterialName, const char*, (S32 index), , "( int index ) - Returns the name of the material at the given index." )
{
TerrainBlock *terr = object->getClientTerrain();
if ( !terr )
@ -2732,7 +2732,7 @@ DefineConsoleMethod( TerrainEditor, getMaterialName, const char*, (S32 index), ,
return Con::getReturnBuffer( name );
}
DefineConsoleMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "( string name ) - Returns the index of the material with the given name or -1." )
DefineEngineMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "( string name ) - Returns the index of the material with the given name or -1." )
{
TerrainBlock *terr = object->getClientTerrain();
if ( !terr )
@ -2747,13 +2747,13 @@ DefineConsoleMethod( TerrainEditor, getMaterialIndex, S32, ( String name ), , "(
return -1;
}
DefineConsoleMethod( TerrainEditor, reorderMaterial, void, ( S32 index, S32 orderPos ), , "( int index, int order ) "
DefineEngineMethod( TerrainEditor, reorderMaterial, void, ( S32 index, S32 orderPos ), , "( int index, int order ) "
"- Reorder material at the given index to the new position, changing the order in which it is rendered / blended." )
{
object->reorderMaterial( index, orderPos );
}
DefineConsoleMethod(TerrainEditor, getTerrainUnderWorldPoint, S32, (const char * ptOrX, const char * Y, const char * Z), ("", "", ""),
DefineEngineMethod(TerrainEditor, getTerrainUnderWorldPoint, S32, (const char * ptOrX, const char * Y, const char * Z), ("", "", ""),
"(x/y/z) Gets the terrain block that is located under the given world point.\n"
"@param x/y/z The world coordinates (floating point values) you wish to query at. "
"These can be formatted as either a string (\"x y z\") or separately as (x, y, z)\n"
@ -2822,12 +2822,12 @@ void TerrainEditor::initPersistFields()
Parent::initPersistFields();
}
DefineConsoleMethod( TerrainEditor, getSlopeLimitMinAngle, F32, (), , "")
DefineEngineMethod( TerrainEditor, getSlopeLimitMinAngle, F32, (), , "")
{
return object->mSlopeMinAngle;
}
DefineConsoleMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "")
DefineEngineMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "")
{
if ( angle < 0.0f )
angle = 0.0f;
@ -2838,12 +2838,12 @@ DefineConsoleMethod( TerrainEditor, setSlopeLimitMinAngle, F32, (F32 angle), , "
return angle;
}
DefineConsoleMethod( TerrainEditor, getSlopeLimitMaxAngle, F32, (), , "")
DefineEngineMethod( TerrainEditor, getSlopeLimitMaxAngle, F32, (), , "")
{
return object->mSlopeMaxAngle;
}
DefineConsoleMethod( TerrainEditor, setSlopeLimitMaxAngle, F32, (F32 angle), , "")
DefineEngineMethod( TerrainEditor, setSlopeLimitMaxAngle, F32, (F32 angle), , "")
{
if ( angle > 90.0f )
angle = 90.0f;

View file

@ -3252,7 +3252,7 @@ DefineEngineMethod( WorldEditor, getActiveSelection, S32, (),,
return object->getActiveSelectionSet()->getId();
}
DefineConsoleMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), ,
DefineEngineMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), ,
"Set the currently active WorldEditorSelection object.\n"
"@param selection A WorldEditorSelectionSet object to use for the selection container.")
{