mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Added console method docs and removed function
Added a ton of console method documenation and removed getSelectionCentroidText when you can just use a Point3F as the return type.
This commit is contained in:
parent
1ce846d235
commit
4f87422392
2 changed files with 149 additions and 82 deletions
|
|
@ -2879,15 +2879,6 @@ const Point3F& WorldEditor::getSelectionCentroid()
|
||||||
return mObjectsUseBoxCenter ? mSelected->getBoxCentroid() : mSelected->getCentroid();
|
return mObjectsUseBoxCenter ? mSelected->getBoxCentroid() : mSelected->getCentroid();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* WorldEditor::getSelectionCentroidText()
|
|
||||||
{
|
|
||||||
const Point3F & centroid = getSelectionCentroid();
|
|
||||||
static const U32 bufSize = 100;
|
|
||||||
char * ret = Con::getReturnBuffer(bufSize);
|
|
||||||
dSprintf(ret, bufSize, "%g %g %g", centroid.x, centroid.y, centroid.z);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Box3F& WorldEditor::getSelectionBounds()
|
const Box3F& WorldEditor::getSelectionBounds()
|
||||||
{
|
{
|
||||||
return mSelected->getBoxBounds();
|
return mSelected->getBoxBounds();
|
||||||
|
|
@ -3187,17 +3178,21 @@ ConsoleMethod( WorldEditor, ignoreObjClass, void, 3, 0, "(string class_name, ...
|
||||||
object->ignoreObjClass(argc, argv);
|
object->ignoreObjClass(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, clearIgnoreList, void, (), , "")
|
DefineEngineMethod( WorldEditor, clearIgnoreList, void, (),,
|
||||||
|
"Clear the ignore class list.\n")
|
||||||
{
|
{
|
||||||
object->clearIgnoreList();
|
object->clearIgnoreList();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, clearSelection, void, (), , "")
|
DefineEngineMethod( WorldEditor, clearSelection, void, (),,
|
||||||
|
"Clear the selection.\n")
|
||||||
{
|
{
|
||||||
object->clearSelection();
|
object->clearSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getActiveSelection, S32, (), , "() - Return the currently active WorldEditorSelection object." )
|
DefineEngineMethod( WorldEditor, getActiveSelection, S32, (),,
|
||||||
|
"Return the currently active WorldEditorSelection object.\n"
|
||||||
|
"@return currently active WorldEditorSelection object or 0 if no selection set is available.")
|
||||||
{
|
{
|
||||||
if( !object->getActiveSelectionSet() )
|
if( !object->getActiveSelectionSet() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -3205,35 +3200,47 @@ DefineConsoleMethod( WorldEditor, getActiveSelection, S32, (), , "() - Return th
|
||||||
return object->getActiveSelectionSet()->getId();
|
return object->getActiveSelectionSet()->getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), , "( id set ) - Set the currently active WorldEditorSelection object." )
|
DefineConsoleMethod( WorldEditor, setActiveSelection, void, ( WorldEditorSelection* selection), ,
|
||||||
|
"Set the currently active WorldEditorSelection object.\n"
|
||||||
|
"@param selection A WorldEditorSelectionSet object to use for the selection container.")
|
||||||
{
|
{
|
||||||
if (selection)
|
if (selection)
|
||||||
object->makeActiveSelectionSet( selection );
|
object->makeActiveSelectionSet( selection );
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, selectObject, void, (const char * objName), , "(SimObject obj)")
|
DefineEngineMethod( WorldEditor, selectObject, void, (SimObject* obj),,
|
||||||
|
"Selects a single object."
|
||||||
|
"@param obj Object to select.")
|
||||||
{
|
{
|
||||||
object->selectObject(objName);
|
object->selectObject(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, unselectObject, void, (const char * objName), , "(SimObject obj)")
|
DefineEngineMethod( WorldEditor, unselectObject, void, (SimObject* obj),,
|
||||||
|
"Unselects a single object."
|
||||||
|
"@param obj Object to unselect.")
|
||||||
{
|
{
|
||||||
object->unselectObject(objName);
|
object->unselectObject(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, invalidateSelectionCentroid, void, (), , "")
|
DefineEngineMethod( WorldEditor, invalidateSelectionCentroid, void, (),,
|
||||||
|
"Invalidate the selection sets centroid.")
|
||||||
{
|
{
|
||||||
WorldEditor::Selection* sel = object->getActiveSelectionSet();
|
WorldEditor::Selection* sel = object->getActiveSelectionSet();
|
||||||
if(sel)
|
if(sel)
|
||||||
sel->invalidateCentroid();
|
sel->invalidateCentroid();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSelectionSize, S32, (), , "() - Return the number of objects currently selected in the editor.")
|
DefineEngineMethod( WorldEditor, getSelectionSize, S32, (),,
|
||||||
|
"Return the number of objects currently selected in the editor."
|
||||||
|
"@return number of objects currently selected in the editor.")
|
||||||
{
|
{
|
||||||
return object->getSelectionSize();
|
return object->getSelectionSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSelectedObject, S32, (S32 index), , "(int index)")
|
DefineEngineMethod( WorldEditor, getSelectedObject, S32, (S32 index),,
|
||||||
|
"Return the selected object and the given index."
|
||||||
|
"@param index Index of selected object to get."
|
||||||
|
"@return selected object at given index or -1 if index is incorrect.")
|
||||||
{
|
{
|
||||||
if(index < 0 || index >= object->getSelectionSize())
|
if(index < 0 || index >= object->getSelectionSize())
|
||||||
{
|
{
|
||||||
|
|
@ -3244,22 +3251,30 @@ DefineConsoleMethod( WorldEditor, getSelectedObject, S32, (S32 index), , "(int i
|
||||||
return(object->getSelectObject(index));
|
return(object->getSelectObject(index));
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSelectionRadius, F32, (), , "")
|
DefineEngineMethod( WorldEditor, getSelectionRadius, F32, (),,
|
||||||
|
"Get the radius of the current selection."
|
||||||
|
"@return radius of the current selection.")
|
||||||
{
|
{
|
||||||
return object->getSelectionRadius();
|
return object->getSelectionRadius();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSelectionCentroid, const char *, (), , "")
|
DefineEngineMethod( WorldEditor, getSelectionCentroid, Point3F, (),,
|
||||||
|
"Get centroid of the selection."
|
||||||
|
"@return centroid of the selection.")
|
||||||
{
|
{
|
||||||
return object->getSelectionCentroidText();
|
return object->getSelectionCentroid();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSelectionExtent, Point3F, (), , "")
|
DefineEngineMethod( WorldEditor, getSelectionExtent, Point3F, (),,
|
||||||
|
"Get extent of the selection."
|
||||||
|
"@return extent of the selection.")
|
||||||
{
|
{
|
||||||
return object->getSelectionExtent();
|
return object->getSelectionExtent();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, dropSelection, void, ( bool skipUndo ), (false), "( bool skipUndo = false )")
|
DefineEngineMethod( WorldEditor, dropSelection, void, (bool skipUndo), (false),
|
||||||
|
"Drop the current selection."
|
||||||
|
"@param skipUndo True to skip creating undo's for this action, false to create an undo.")
|
||||||
{
|
{
|
||||||
|
|
||||||
object->dropCurrentSelection( skipUndo );
|
object->dropCurrentSelection( skipUndo );
|
||||||
|
|
@ -3275,17 +3290,20 @@ void WorldEditor::copyCurrentSelection()
|
||||||
copySelection(mSelected);
|
copySelection(mSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, cutSelection, void, (),, "")
|
DefineEngineMethod( WorldEditor, cutSelection, void, (), ,
|
||||||
|
"Cut the current selection to be pasted later.")
|
||||||
{
|
{
|
||||||
object->cutCurrentSelection();
|
object->cutCurrentSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, copySelection, void, (),, "")
|
DefineEngineMethod( WorldEditor, copySelection, void, (), ,
|
||||||
|
"Copy the current selection to be pasted later.")
|
||||||
{
|
{
|
||||||
object->copyCurrentSelection();
|
object->copyCurrentSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, pasteSelection, void, (),, "")
|
DefineEngineMethod( WorldEditor, pasteSelection, void, (), ,
|
||||||
|
"Paste the current selection.")
|
||||||
{
|
{
|
||||||
object->pasteSelection();
|
object->pasteSelection();
|
||||||
}
|
}
|
||||||
|
|
@ -3295,149 +3313,182 @@ bool WorldEditor::canPasteSelection()
|
||||||
return mCopyBuffer.empty() != true;
|
return mCopyBuffer.empty() != true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, canPasteSelection, bool, (),, "")
|
DefineEngineMethod( WorldEditor, canPasteSelection, bool, (), ,
|
||||||
|
"Check if we can paste the current selection."
|
||||||
|
"@return True if we can paste the current selection, false if not.")
|
||||||
{
|
{
|
||||||
return object->canPasteSelection();
|
return object->canPasteSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, hideObject, void, (SceneObject *obj, bool hide), , "(Object obj, bool hide)")
|
DefineEngineMethod( WorldEditor, hideObject, void, (SceneObject* obj, bool hide), ,
|
||||||
|
"Hide/show the given object."
|
||||||
|
"@param obj Object to hide/show."
|
||||||
|
"@param hide True to hide the object, false to show it.")
|
||||||
{
|
{
|
||||||
|
|
||||||
if (obj)
|
if (obj)
|
||||||
object->hideObject(obj, hide);
|
object->hideObject(obj, hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, hideSelection, void, (bool hide), , "(bool hide)")
|
DefineEngineMethod( WorldEditor, hideSelection, void, (bool hide), ,
|
||||||
|
"Hide/show the selection."
|
||||||
|
"@param hide True to hide the selection, false to show it.")
|
||||||
{
|
{
|
||||||
object->hideSelection(hide);
|
object->hideSelection(hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, lockSelection, void, (bool lock), , "(bool lock)")
|
DefineEngineMethod( WorldEditor, lockSelection, void, (bool lock), ,
|
||||||
|
"Lock/unlock the selection."
|
||||||
|
"@param lock True to lock the selection, false to unlock it.")
|
||||||
{
|
{
|
||||||
object->lockSelection(lock);
|
object->lockSelection(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, alignByBounds, void, (S32 boundsAxis), , "(int boundsAxis)"
|
//TODO: Put in the param possible options and what they mean
|
||||||
"Align all selected objects against the given bounds axis.")
|
DefineEngineMethod( WorldEditor, alignByBounds, void, (S32 boundsAxis), ,
|
||||||
|
"Align all selected objects against the given bounds axis."
|
||||||
|
"@param boundsAxis Bounds axis to align all selected objects against.")
|
||||||
{
|
{
|
||||||
if(!object->alignByBounds(boundsAxis))
|
if(!object->alignByBounds(boundsAxis))
|
||||||
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByBounds: invalid bounds axis '%s'", boundsAxis));
|
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByBounds: invalid bounds axis '%s'", boundsAxis));
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, alignByAxis, void, (S32 boundsAxis), , "(int axis)"
|
//TODO: Put in the param possible options and what they mean (assuming x,y,z)
|
||||||
"Align all selected objects along the given axis.")
|
DefineEngineMethod( WorldEditor, alignByAxis, void, (S32 axis), ,
|
||||||
|
"Align all selected objects along the given axis."
|
||||||
|
"@param axis Axis to align all selected objects along.")
|
||||||
{
|
{
|
||||||
if(!object->alignByAxis(boundsAxis))
|
if(!object->alignByAxis(axis))
|
||||||
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByAxis: invalid axis '%s'", boundsAxis));
|
Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByAxis: invalid axis '%s'", axis));
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, resetSelectedRotation, void, (),, "")
|
DefineEngineMethod( WorldEditor, resetSelectedRotation, void, (), ,
|
||||||
|
"Reset the rotation of the selection.")
|
||||||
{
|
{
|
||||||
object->resetSelectedRotation();
|
object->resetSelectedRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, resetSelectedScale, void, (),, "")
|
DefineEngineMethod( WorldEditor, resetSelectedScale, void, (), ,
|
||||||
|
"Reset the scale of the selection.")
|
||||||
{
|
{
|
||||||
object->resetSelectedScale();
|
object->resetSelectedScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, redirectConsole, void, (S32 objID), , "( int objID )")
|
//TODO: Better documentation on exactly what this does.
|
||||||
|
DefineEngineMethod( WorldEditor, redirectConsole, void, (S32 objID), ,
|
||||||
|
"Redirect console."
|
||||||
|
"@param objID Object id.")
|
||||||
{
|
{
|
||||||
object->redirectConsole(objID);
|
object->redirectConsole(objID);
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, addUndoState, void, (),, "")
|
DefineEngineMethod( WorldEditor, addUndoState, void, (), ,
|
||||||
|
"Adds/Submits an undo state to the undo manager.")
|
||||||
{
|
{
|
||||||
object->addUndoState();
|
object->addUndoState();
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSoftSnap, bool, (),, "getSoftSnap()\n"
|
DefineEngineMethod( WorldEditor, getSoftSnap, bool, (), ,
|
||||||
"Is soft snapping always on?")
|
"Is soft snapping always on?"
|
||||||
|
"@return True if soft snap is on, false if not.")
|
||||||
{
|
{
|
||||||
return object->mSoftSnap;
|
return object->mSoftSnap;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, setSoftSnap, void, (bool enable), , "setSoftSnap(bool)\n"
|
DefineEngineMethod( WorldEditor, setSoftSnap, void, (bool softSnap), ,
|
||||||
"Allow soft snapping all of the time.")
|
"Allow soft snapping all of the time."
|
||||||
|
"@param softSnap True to turn soft snap on, false to turn it off.")
|
||||||
{
|
{
|
||||||
object->mSoftSnap = enable;
|
object->mSoftSnap = softSnap;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSoftSnapSize, F32, (),, "getSoftSnapSize()\n"
|
DefineEngineMethod( WorldEditor, getSoftSnapSize, F32, (), ,
|
||||||
"Get the absolute size to trigger a soft snap.")
|
"Get the absolute size to trigger a soft snap."
|
||||||
|
"@return absolute size to trigger a soft snap.")
|
||||||
{
|
{
|
||||||
return object->mSoftSnapSize;
|
return object->mSoftSnapSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, setSoftSnapSize, void, (F32 size), , "setSoftSnapSize(F32)\n"
|
DefineEngineMethod( WorldEditor, setSoftSnapSize, void, (F32 size), ,
|
||||||
"Set the absolute size to trigger a soft snap.")
|
"Set the absolute size to trigger a soft snap."
|
||||||
|
"@param size Absolute size to trigger a soft snap.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapSize = size;
|
object->mSoftSnapSize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod( WorldEditor, getSoftSnapAlignment, WorldEditor::AlignmentType, (),,
|
DefineEngineMethod( WorldEditor, getSoftSnapAlignment, WorldEditor::AlignmentType, (),,
|
||||||
"Get the soft snap alignment." )
|
"Get the soft snap alignment."
|
||||||
|
"@return soft snap alignment.")
|
||||||
{
|
{
|
||||||
return object->mSoftSnapAlignment;
|
return object->mSoftSnapAlignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod( WorldEditor, setSoftSnapAlignment, void, ( WorldEditor::AlignmentType type ),,
|
DefineEngineMethod( WorldEditor, setSoftSnapAlignment, void, ( WorldEditor::AlignmentType type ),,
|
||||||
"Set the soft snap alignment." )
|
"Set the soft snap alignment."
|
||||||
|
"@param type Soft snap alignment type.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapAlignment = type;
|
object->mSoftSnapAlignment = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, softSnapSizeByBounds, void, (bool enable), , "softSnapSizeByBounds(bool)\n"
|
DefineEngineMethod( WorldEditor, softSnapSizeByBounds, void, (bool useBounds), ,
|
||||||
"Use selection bounds size as soft snap bounds.")
|
"Use selection bounds size as soft snap bounds."
|
||||||
|
"@param useBounds True to use selection bounds size as soft snap bounds, false to not.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapSizeByBounds = enable;
|
object->mSoftSnapSizeByBounds = useBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, getSoftSnapBackfaceTolerance, F32, (), , "getSoftSnapBackfaceTolerance()\n"
|
DefineEngineMethod( WorldEditor, getSoftSnapBackfaceTolerance, F32, (),,
|
||||||
"The fraction of the soft snap radius that backfaces may be included.")
|
"Get the fraction of the soft snap radius that backfaces may be included."
|
||||||
|
"@return fraction of the soft snap radius that backfaces may be included.")
|
||||||
{
|
{
|
||||||
return object->mSoftSnapBackfaceTolerance;
|
return object->mSoftSnapBackfaceTolerance;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, setSoftSnapBackfaceTolerance, void, (F32 range), , "setSoftSnapBackfaceTolerance(F32 with range of 0..1)\n"
|
DefineEngineMethod( WorldEditor, setSoftSnapBackfaceTolerance, void, (F32 tolerance),,
|
||||||
"The fraction of the soft snap radius that backfaces may be included.")
|
"Set the fraction of the soft snap radius that backfaces may be included."
|
||||||
|
"@param tolerance Fraction of the soft snap radius that backfaces may be included (range of 0..1).")
|
||||||
{
|
{
|
||||||
object->mSoftSnapBackfaceTolerance = range;
|
object->mSoftSnapBackfaceTolerance = tolerance;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, softSnapRender, void, (bool enable), , "softSnapRender(bool)\n"
|
DefineEngineMethod( WorldEditor, softSnapRender, void, (F32 render),,
|
||||||
"Render the soft snapping bounds.")
|
"Render the soft snapping bounds."
|
||||||
|
"@param render True to render the soft snapping bounds, false to not.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapRender = enable;
|
object->mSoftSnapRender = render;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, softSnapRenderTriangle, void, (bool enable), , "softSnapRenderTriangle(bool)\n"
|
DefineEngineMethod( WorldEditor, softSnapRenderTriangle, void, (F32 renderTriangle),,
|
||||||
"Render the soft snapped triangle.")
|
"Render the soft snapped triangle."
|
||||||
|
"@param renderTriangle True to render the soft snapped triangle, false to not.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapRenderTriangle = enable;
|
object->mSoftSnapRenderTriangle = renderTriangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, softSnapDebugRender, void, (bool enable), , "softSnapDebugRender(bool)\n"
|
DefineEngineMethod( WorldEditor, softSnapDebugRender, void, (F32 debugRender),,
|
||||||
"Toggle soft snapping debug rendering.")
|
"Toggle soft snapping debug rendering."
|
||||||
|
"@param debugRender True to turn on soft snapping debug rendering, false to turn it off.")
|
||||||
{
|
{
|
||||||
object->mSoftSnapDebugRender = enable;
|
object->mSoftSnapDebugRender = debugRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod( WorldEditor, getTerrainSnapAlignment, WorldEditor::AlignmentType, (),,
|
DefineEngineMethod( WorldEditor, getTerrainSnapAlignment, WorldEditor::AlignmentType, (),,
|
||||||
"Get the terrain snap alignment. " )
|
"Get the terrain snap alignment."
|
||||||
|
"@return terrain snap alignment type.")
|
||||||
{
|
{
|
||||||
return object->mTerrainSnapAlignment;
|
return object->mTerrainSnapAlignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod( WorldEditor, setTerrainSnapAlignment, void, ( WorldEditor::AlignmentType alignment ),,
|
DefineEngineMethod( WorldEditor, setTerrainSnapAlignment, void, ( WorldEditor::AlignmentType alignment ),,
|
||||||
"Set the terrain snap alignment." )
|
"Set the terrain snap alignment."
|
||||||
|
"@param alignment New terrain snap alignment type.")
|
||||||
{
|
{
|
||||||
object->mTerrainSnapAlignment = alignment;
|
object->mTerrainSnapAlignment = alignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, transformSelection, void,
|
DefineEngineMethod( WorldEditor, transformSelection, void,
|
||||||
( bool position,
|
( bool position,
|
||||||
Point3F point,
|
Point3F point,
|
||||||
bool relativePos,
|
bool relativePos,
|
||||||
|
|
@ -3449,8 +3500,18 @@ DefineConsoleMethod( WorldEditor, transformSelection, void,
|
||||||
Point3F scale,
|
Point3F scale,
|
||||||
bool sRelative,
|
bool sRelative,
|
||||||
bool sLocal ), ,
|
bool sLocal ), ,
|
||||||
"transformSelection(...)\n"
|
"Transform selection by given parameters."
|
||||||
"Transform selection by given parameters.")
|
"@param position True to transform the selection's position."
|
||||||
|
"@param point Position to transform by."
|
||||||
|
"@param relativePos True to use relative position."
|
||||||
|
"@param rotate True to transform the selection's rotation."
|
||||||
|
"@param rotation Rotation to transform by."
|
||||||
|
"@param relativeRot True to use the relative rotation."
|
||||||
|
"@param rotLocal True to use the local rotation."
|
||||||
|
"@param scaleType Scale type to use."
|
||||||
|
"@param scale Scale to transform by."
|
||||||
|
"@param sRelative True to use a relative scale."
|
||||||
|
"@param sLocal True to use a local scale.")
|
||||||
{
|
{
|
||||||
object->transformSelection(position, point, relativePos, rotate, rotation, relativeRot, rotLocal, scaleType, scale, sRelative, sLocal);
|
object->transformSelection(position, point, relativePos, rotate, rotation, relativeRot, rotLocal, scaleType, scale, sRelative, sLocal);
|
||||||
}
|
}
|
||||||
|
|
@ -3525,9 +3586,10 @@ void WorldEditor::colladaExportSelection( const String &path )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, colladaExportSelection, void, (const char * path), ,
|
DefineEngineMethod( WorldEditor, colladaExportSelection, void, ( const char* path ),,
|
||||||
"( String path ) - Export the combined geometry of all selected objects to the specified path in collada format." )
|
"Export the combined geometry of all selected objects to the specified path in collada format."
|
||||||
{
|
"@param path Path to export collada format to.")
|
||||||
|
{
|
||||||
object->colladaExportSelection( path );
|
object->colladaExportSelection( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3679,17 +3741,23 @@ void WorldEditor::explodeSelectedPrefab()
|
||||||
setDirty();
|
setDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, makeSelectionPrefab, void, ( const char * filename ), , "( string filename ) - Save selected objects to a .prefab file and replace them in the level with a Prefab object." )
|
DefineEngineMethod( WorldEditor, makeSelectionPrefab, void, ( const char* filename ),,
|
||||||
|
"Save selected objects to a .prefab file and replace them in the level with a Prefab object."
|
||||||
|
"@param filename Prefab file to save the selected objects to.")
|
||||||
{
|
{
|
||||||
object->makeSelectionPrefab( filename );
|
object->makeSelectionPrefab( filename );
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, explodeSelectedPrefab, void, (),, "() - Replace selected Prefab objects with a SimGroup containing all children objects defined in the .prefab." )
|
DefineEngineMethod( WorldEditor, explodeSelectedPrefab, void, (),,
|
||||||
|
"Replace selected Prefab objects with a SimGroup containing all children objects defined in the .prefab.")
|
||||||
{
|
{
|
||||||
object->explodeSelectedPrefab();
|
object->explodeSelectedPrefab();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineConsoleMethod( WorldEditor, mountRelative, void, ( SceneObject *objA, SceneObject *objB ), , "( Object A, Object B )" )
|
DefineEngineMethod( WorldEditor, mountRelative, void, ( SceneObject *objA, SceneObject *objB ),,
|
||||||
|
"Mount object B relatively to object A."
|
||||||
|
"@param objA Object to mount to."
|
||||||
|
"@param objB Object to mount.")
|
||||||
{
|
{
|
||||||
if (!objA || !objB)
|
if (!objA || !objB)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,6 @@ class WorldEditor : public EditTSCtrl
|
||||||
S32 getSelectionSize();
|
S32 getSelectionSize();
|
||||||
S32 getSelectObject(S32 index);
|
S32 getSelectObject(S32 index);
|
||||||
const Point3F& getSelectionCentroid();
|
const Point3F& getSelectionCentroid();
|
||||||
const char* getSelectionCentroidText();
|
|
||||||
const Box3F& getSelectionBounds();
|
const Box3F& getSelectionBounds();
|
||||||
Point3F getSelectionExtent();
|
Point3F getSelectionExtent();
|
||||||
F32 getSelectionRadius();
|
F32 getSelectionRadius();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue