浏览代码

Merge pull request #1183 from MusicMonkey5555/documentation

Documentation
Daniel Buckmaster 10 年之前
父节点
当前提交
486a12cb96

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

@@ -511,7 +511,7 @@ DefineEngineFunction(fileSize, S32, ( const char* fileName ),,
 	"@brief Determines the size of a file on disk\n\n"
 
 	"@param fileName Name and path of the file to check\n"
-	"@return Returns filesize in KB, or -1 if no file\n"
+	"@return Returns filesize in bytes, or -1 if no file\n"
 
 	"@ingroup FileSystem")
 {

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

@@ -344,7 +344,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrl, forceClose, void, (), , "")
    object->closePopUp();
 }
 
-DefineConsoleMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "")
+DefineConsoleMethod( GuiPopUpMenuCtrl, getSelected, S32, (), , "Gets the selected index")
 {
    return object->getSelected();
 }
@@ -430,7 +430,7 @@ DefineConsoleMethod( GuiPopUpMenuCtrl, setEnumContent, void, (const char * class
 
 //------------------------------------------------------------------------------
 DefineConsoleMethod( GuiPopUpMenuCtrl, findText, S32, (const char * text), , "(string text)"
-              "Returns the position of the first entry containing the specified text.")
+              "Returns the position of the first entry containing the specified text or -1 if not found.")
 {
    return( object->findText( text ) );   
 }

+ 187 - 86
Engine/source/gui/controls/guiTreeViewCtrl.cpp

@@ -4858,24 +4858,33 @@ DefineEngineMethod( GuiTreeViewCtrl, addSelection, void, ( S32 id, bool isLastSe
    object->addSelection( id, isLastSelection, isLastSelection );
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, addChildSelectionByValue, void, (S32 id, const char * tableEntry), , "addChildSelectionByValue(TreeItemId parent, value)")
+DefineEngineMethod( GuiTreeViewCtrl, addChildSelectionByValue, void, ( S32 parentId, const char* value), ,
+   "Add a child selection by it's value.\n\n"
+   "@param parentId Parent TreeItemId.\n"
+   "@param value Value to search for.\n")
 {
-   GuiTreeViewCtrl::Item* parentItem = object->getItem(id);
-   GuiTreeViewCtrl::Item* child = parentItem->findChildByValue(tableEntry);
+   GuiTreeViewCtrl::Item* parentItem = object->getItem(parentId);
+   GuiTreeViewCtrl::Item* child = parentItem->findChildByValue(value);
    object->addSelection(child->getID());
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, removeSelection, void, (S32 id), , "(deselects an item)")
+DefineEngineMethod( GuiTreeViewCtrl, removeSelection, void, ( S32 itemId), ,
+   "Deselect an item or remove it from the selection.\n\n"
+   "@param itemId Item Id to deselect.\n")
 {
-   object->removeSelection(id);
+   object->removeSelection(itemId);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, removeChildSelectionByValue, void, (S32 id, const char * tableEntry), , "removeChildSelectionByValue(TreeItemId parent, value)")
+DefineEngineMethod( GuiTreeViewCtrl, removeChildSelectionByValue, void, ( S32 parentId, const char* value), ,
+   "Deselect a child item or remove it from the selection based on its parent and its value.\n\n"
+   "@param parentId Parent TreeItemId.\n"
+   "@param value Value to search for.\n"
+   "@param performCallback True to notify script of the change, false to not.\n")
 {
-   GuiTreeViewCtrl::Item* parentItem = object->getItem(id);
+   GuiTreeViewCtrl::Item* parentItem = object->getItem(parentId);
    if(parentItem)
    {
-      GuiTreeViewCtrl::Item* child = parentItem->findChildByValue(tableEntry);
+      GuiTreeViewCtrl::Item* child = parentItem->findChildByValue(value);
 	  if(child)
 	  {
          object->removeSelection(child->getID());
@@ -4883,34 +4892,53 @@ DefineConsoleMethod(GuiTreeViewCtrl, removeChildSelectionByValue, void, (S32 id,
    }
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, selectItem, bool, (S32 id, bool select), (true), "(TreeItemId item, bool select=true)")
+DefineEngineMethod( GuiTreeViewCtrl, selectItem, bool, ( S32 itemID, bool select), (true) ,
+   "Select or deselect and item.\n\n"
+   "@param itemID TreeItemId of item to select or deselect.\n"
+   "@param select True to select the item, false to deselect it.\n"
+   "@return True if it was successful, false if not.")
 {
-
-   return object->setItemSelected(id, select);
+   return object->setItemSelected(itemID, select);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, expandItem, bool, (S32 id, bool expand), (true), "(TreeItemId item, bool expand=true)")
+DefineEngineMethod( GuiTreeViewCtrl, expandItem, bool, ( S32 itemID, bool expand), (true) ,
+   "Expand/contract item, item's sub-tree.\n\n"
+   "@param itemID TreeItemId of item to expand or contract.\n"
+   "@param expand True to expand the item, false to contract it.\n"
+   "@return True if it was successful, false if not.")
 {
-   return(object->setItemExpanded(id, expand));
+   return(object->setItemExpanded(itemID, expand));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, markItem, bool, (S32 id, bool mark), (true), "(TreeItemId item, bool mark=true)")
+DefineEngineMethod( GuiTreeViewCtrl, markItem, bool, ( S32 itemID, bool mark), (true) ,
+   "Mark/unmark item.\n\n"
+   "@param itemID TreeItemId of item to Mark or unmark.\n"
+   "@param mark True to Mark the item, false to unmark it.\n"
+   "@return True if it was successful, false if not.")
 {
-   return object->markItem(id, mark);
+   return object->markItem(itemID, mark);
 }
 
-// Make the given item visible.
-DefineConsoleMethod(GuiTreeViewCtrl, scrollVisible, void, (S32 itemId), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, scrollVisible, bool, ( S32 itemID), ,
+   "Make the given item visible.\n\n"
+   "@param itemID TreeItemId of item to scroll to/make visible.\n"
+   "@return True if it was successful, false if not.")
 {
-   object->scrollVisible(itemId);
+   object->scrollVisible(itemID);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, buildIconTable, bool, (const char * icons), , "(builds an icon table)")
-{   
+DefineEngineMethod( GuiTreeViewCtrl, buildIconTable, bool, ( const char* icons), ,
+   "Builds an icon table.\n\n"
+   "@param icons Name of icons to build, Icons should be designated by the bitmap/png file names (minus the file extensions)"
+   "and separated by colons (:). This list should be synchronized with the Icons enum\n"
+   "@return True if it was successful, false if not.")
+{
    return object->buildIconTable(icons);
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, open, void, (const char * objName, bool okToEdit), (true), "(SimSet obj, bool okToEdit=true) Set the root of the tree view to the specified object, or to the root set.")
+DefineEngineMethod( GuiTreeViewCtrl, open, void, ( const char * objName, bool okToEdit), (true),
+   "Set the root of the tree view to the specified object, or to the root set.\n\n"
+   "@param objName Name or id of SimSet or object to set the tree root equal to.\n")
 {
    SimSet *treeRoot = NULL;
    SimObject* target = Sim::findObject(objName);
@@ -4925,26 +4953,35 @@ DefineConsoleMethod( GuiTreeViewCtrl, open, void, (const char * objName, bool ok
    object->inspectObject(treeRoot,okToEdit);
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, setItemTooltip, void, ( S32 id, const char * text ), , "( int id, string text ) - Set the tooltip to show for the given item." )
+DefineEngineMethod( GuiTreeViewCtrl, setItemTooltip, bool, ( S32 itemId, const char* tooltip), ,
+   "Set the tooltip to show for the given item.\n\n"
+   "@param itemId  TreeItemID of item to set the tooltip for.\n"
+   "@param tooltip	String tooltip to set for the item."
+   "@return True if successfully found the item, false if not")
 {
-   
-   GuiTreeViewCtrl::Item* item = object->getItem( id );
+   GuiTreeViewCtrl::Item* item = object->getItem( itemId );
    if( !item )
    {
-      Con::errorf( "GuiTreeViewCtrl::setTooltip() - invalid item id '%i'", id );
-      return;
+      Con::errorf( "GuiTreeViewCtrl::setTooltip() - invalid item id '%i'", itemId );
+      return false;
    }
-   
-   item->mTooltip = text;
+
+   item->mTooltip = tooltip;
+
+   return true;
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, setItemImages, void, ( S32 id, S8 normalImage, S8 expandedImage ), , "( int id, int normalImage, int expandedImage ) - Sets the normal and expanded images to show for the given item." )
+DefineEngineMethod( GuiTreeViewCtrl, setItemImages, void, ( S32 itemId, S8 normalImage, S8 expandedImage ), ,
+   "Sets the normal and expanded images to show for the given item.\n\n"
+   "@param itemId TreeItemID of item to set images for.\n"
+   "@param normalImage Normal image to set for the given item."
+   "@param expandedImage Expanded image to set for the given item.")
 {
 
-   GuiTreeViewCtrl::Item* item = object->getItem( id );
+   GuiTreeViewCtrl::Item* item = object->getItem( itemId );
    if( !item )
    {
-      Con::errorf( "GuiTreeViewCtrl::setItemImages() - invalid item id '%i'", id );
+      Con::errorf( "GuiTreeViewCtrl::setItemImages() - invalid item id '%i'", itemId );
       return;
    }
 
@@ -4952,95 +4989,135 @@ DefineConsoleMethod( GuiTreeViewCtrl, setItemImages, void, ( S32 id, S8 normalIm
    item->setExpandedImage(expandedImage);
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, isParentItem, bool, ( S32 id ), , "( int id ) - Returns true if the given item contains child items." )
+DefineEngineMethod( GuiTreeViewCtrl, isParentItem, bool, ( S32 itemId ), ,
+   "Returns true if the given item contains child items.\n\n"
+   "@param itemId TreeItemID to check for children.\n"
+   "@return True if the given item contains child items, false if not.")
 {
-   if( !id && object->getItemCount() )
+   if( !itemId && object->getItemCount() )
       return true;
    
-   GuiTreeViewCtrl::Item* item = object->getItem( id );
+   GuiTreeViewCtrl::Item* item = object->getItem( itemId );
    if( !item )
    {
-      Con::errorf( "GuiTreeViewCtrl::isParentItem - invalid item id '%i'", id );
+      Con::errorf( "GuiTreeViewCtrl::isParentItem - invalid item id '%i'", itemId );
       return false;
    }
    
    return item->isParent();
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getItemText, const char *, (S32 index), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, getItemText, const char *, ( S32 itemId ), ,
+   "Gets the text for a given item.\n\n"
+   "@param itemId TreeItemID to get text of.\n"
+   "@return Text for a given item.")
 {
-   return object->getItemText(index);
+   return(object->getItemText(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getItemValue, const char *, (S32 itemId), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, getItemValue, const char *, ( S32 itemId ), ,
+   "Gets the value for a given item.\n\n"
+   "@param itemId TreeItemID to get value of.\n"
+   "@return Value for a given item.")
 {
    return object->getItemValue(itemId);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, editItem, bool, (S32 item, const char * newText, const char * newValue), , "(TreeItemId item, string newText, string newValue)")
+DefineEngineMethod( GuiTreeViewCtrl, editItem, bool, ( S32 itemId, const char* newText, const char* newValue ), ,
+   "Edits the text and value for a given tree item.\n\n"
+   "@param itemId TreeItemID to edit.\n"
+   "@return True if successful, false if not.")
 {
-   return(object->editItem(item, newText, newValue));
+   return(object->editItem(itemId, newText, newValue));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, removeItem, bool, (S32 itemId), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, removeItem, bool, (S32 itemId), ,
+   "Remove an item from the tree with the given id.\n\n"
+   "@param itemId TreeItemID of item to remove.\n"
+   "@return True if successful, false if not.")
 {
    return(object->removeItem(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, removeAllChildren, void, (S32 itemId), , "removeAllChildren(TreeItemId parent)")
+DefineEngineMethod( GuiTreeViewCtrl, removeAllChildren, void, (S32 itemId), ,
+   "Remove all children of an item from the tree with the given id.\n\n"
+   "@param itemId TreeItemID of item that has children we should remove.\n")
 {
    object->removeAllChildren(itemId);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, clear, void, (), , "() - empty tree")
+DefineEngineMethod( GuiTreeViewCtrl, clear, void, (), ,
+   "Empty the tree.\n")
 {
    object->removeItem(0);
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getFirstRootItem, S32, (), , "Get id for root item.")
+DefineEngineMethod( GuiTreeViewCtrl, getFirstRootItem, S32, (), ,
+   "Get id for root item.\n"
+   "@return Id for root item.")
 {
    return(object->getFirstRootItem());
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getChild, S32, (S32 itemId), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, getChild, S32, (S32 itemId), ,
+   "Get the child of the parent with the given id.\n\n"
+   "@param itemId TreeItemID of item that a child we should get.\n"
+   "@return Id of child of given item.")
 {
    return(object->getChildItem(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, buildVisibleTree, void, (bool forceFullUpdate), (false), "Build the visible tree")
-{
-      
+DefineEngineMethod( GuiTreeViewCtrl, buildVisibleTree, void, (bool forceFullUpdate), (false),
+   "Build the visible tree.\n\n"
+   "@param forceFullUpdate True to force a full update of the tree, false to only update the new stuff.\n")
+{      
    object->buildVisibleTree( forceFullUpdate );
 }
 
 //FIXME: [rene 11/09/09 - This clashes with GuiControl.getParent(); bad thing; should be getParentItem]
-DefineConsoleMethod(GuiTreeViewCtrl, getParentItem, S32, (S32 itemId), , "(TreeItemId item)")
-{
+DefineEngineMethod( GuiTreeViewCtrl, getParentItem, S32, (S32 itemId), ,
+   "Get the parent of a given id in the tree.\n\n"
+   "@param itemId TreeItemID of item that has a parent we should get.\n"
+   "@return Id of parent of given item.")
+{      
    return(object->getParentItem(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getNextSibling, S32, (S32 itemId), , "(TreeItemId item)")
-{
+DefineEngineMethod( GuiTreeViewCtrl, getNextSibling, S32, (S32 itemId), ,
+   "Get the next sibling of the given item id in the tree.\n\n"
+   "@param itemId TreeItemID of item that we want the next sibling of.\n"
+   "@return Id of next sibling of the given item.")
+{      
    return(object->getNextSiblingItem(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getPrevSibling, S32, (S32 itemId), , "(TreeItemId item)")
-{
+DefineEngineMethod( GuiTreeViewCtrl, getPrevSibling, S32, (S32 itemId), ,
+   "Get the previous sibling of the given item id in the tree.\n\n"
+   "@param itemId TreeItemID of item that we want the previous sibling of.\n"
+   "@return Id of previous sibling of the given item.")
+{      
    return(object->getPrevSiblingItem(itemId));
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getItemCount, S32, (), , "")
-{
+DefineEngineMethod( GuiTreeViewCtrl, getItemCount, S32, (), ,
+   "Get the total number of items in the tree or item count.\n\n"
+   "@return total number of items in the tree.")
+{      
    return(object->getItemCount());
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getSelectedItem, S32, ( S32 index ), (0), "( int index=0 ) - Return the selected item at the given index.")
+DefineEngineMethod( GuiTreeViewCtrl, getSelectedItem, S32, (S32 index), (0),
+   "Return the selected item at the given index.\n\n"
+   "@param index Given index to look for selected item."
+   "@return selected item at the given index.")
 {
-      
    return ( object->getSelectedItem( index ) );
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getSelectedObject, S32, ( S32 index ), (0), "( int index=0 ) - Return the currently selected SimObject at the given index in inspector mode or -1")
+DefineEngineMethod( GuiTreeViewCtrl, getSelectedObject, S32, (S32 index), (0),
+   "Return the currently selected SimObject at the given index in inspector mode or -1.\n\n"
+   "@param index Given index to look for selected object."
+   "@return currently selected SimObject at the given index in inspector mode or -1.")
 {
    GuiTreeViewCtrl::Item *item = object->getItem( object->getSelectedItem( index ) );
    if( item != NULL && item->isInspectorData() )
@@ -5088,33 +5165,41 @@ const char* GuiTreeViewCtrl::getSelectedObjectList()
    return buff;
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getSelectedObjectList, const char*, (), , 
-              "Returns a space seperated list of all selected object ids.")
+DefineEngineMethod( GuiTreeViewCtrl, getSelectedObjectList, const char*, (), ,
+   "Returns a space separated list of all selected object ids.\n\n"
+   "@return space separated list of all selected object ids.")
 {
    return object->getSelectedObjectList();
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, moveItemUp, void, (S32 index), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, moveItemUp, void, (S32 itemId), ,
+   "Move the specified item up in the tree.\n\n"
+   "@param itemId TreeItemId of item to move up in the tree.")
 {
-   object->moveItemUp( index );
+   object->moveItemUp( itemId );
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getSelectedItemsCount, S32, (), , "")
+DefineEngineMethod( GuiTreeViewCtrl, getSelectedItemsCount, S32, (), ,
+   "Get the selected number of items.\n\n"
+   "@return number of selected items.")
 {
    return ( object->getSelectedItemsCount() );
 }
 
-
-
-DefineConsoleMethod(GuiTreeViewCtrl, moveItemDown, void, (S32 index), , "(TreeItemId item)")
+DefineEngineMethod( GuiTreeViewCtrl, moveItemDown, void, (S32 itemId), ,
+   "Move the specified item down in the tree.\n\n"
+   "@param itemId TreeItemId of item to move down in the tree.")
 {
-   object->moveItemDown( index );
+   object->moveItemDown( itemId );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod(GuiTreeViewCtrl, getTextToRoot, const char*, (S32 itemId, const char * delimiter), ,
-   "(TreeItemId item,Delimiter=none) gets the text from the current node to the root, concatenating at each branch upward, with a specified delimiter optionally")
+DefineEngineMethod( GuiTreeViewCtrl, getTextToRoot, const char*, (S32 itemId, const char* delimiter), (""),
+   "Gets the text from the current node to the root, concatenating at each branch upward, with a specified delimiter optionally.\n\n"
+   "@param itemId TreeItemId of node to start at."
+   "@param delimiter (Optional) delimiter to use between each branch concatenation."
+   "@return text from the current node to the root.")
 {
 	if (!dStrcmp(delimiter, "" ))
    {
@@ -5124,7 +5209,9 @@ DefineConsoleMethod(GuiTreeViewCtrl, getTextToRoot, const char*, (S32 itemId, co
    return object->getTextToRoot( itemId, delimiter );
 }
 
-DefineConsoleMethod(GuiTreeViewCtrl, getSelectedItemList,const char*, (), ,"returns a space seperated list of mulitple item ids")
+DefineEngineMethod( GuiTreeViewCtrl, getSelectedItemList, const char*, (), ,
+   "Returns a space separated list if ids of all selected items.\n\n"
+   "@return space separated list of selected item ids.")
 {
    const U32 bufSize = 1024;
 	char* buff = Con::getReturnBuffer(bufSize);
@@ -5170,9 +5257,12 @@ S32 GuiTreeViewCtrl::findItemByObjectId(S32 iObjId)
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod(GuiTreeViewCtrl, findItemByObjectId, S32, ( S32 itemId ), , "(find item by object id and returns the mId)")
+DefineEngineMethod( GuiTreeViewCtrl, findItemByObjectId, S32, (S32 objectId), ,
+   "Find an item by its object id and returns the Tree Item ID for it.\n\n"
+   "@param objectId	Object id you want the item id for."
+   "@return Tree Item Id for the given object ID.")
 {
-   return(object->findItemByObjectId(itemId));
+   return(object->findItemByObjectId(objectId));
 }
 
 //------------------------------------------------------------------------------
@@ -5215,26 +5305,33 @@ bool GuiTreeViewCtrl::scrollVisibleByObjectId(S32 objID)
 }
 
 //------------------------------------------------------------------------------
-DefineConsoleMethod(GuiTreeViewCtrl, scrollVisibleByObjectId, S32, ( S32 itemId ), , "(show item by object id. returns true if sucessful.)")
+DefineEngineMethod( GuiTreeViewCtrl, scrollVisibleByObjectId, S32, (S32 objectId), ,
+   "Show item by object id.\n\n"
+   "@param objectId	Object id you want to scroll to."
+   "@return True if successful, false if not.")
 {
-   return(object->scrollVisibleByObjectId(itemId));
+   return(object->scrollVisibleByObjectId(objectId));
 }
 
 //------------------------------------------------------------------------------
 
 //FIXME: this clashes with SimSet.sort()
-DefineConsoleMethod( GuiTreeViewCtrl, sort, void, ( S32 parent, bool traverseHierarchy, bool parentsFirst, bool caseSensitive ), ( 0, false, false, true ), 
-   "( int parent, bool traverseHierarchy=false, bool parentsFirst=false, bool caseSensitive=true ) - Sorts all items of the given parent (or root).  With 'hierarchy', traverses hierarchy." )
+DefineEngineMethod( GuiTreeViewCtrl, sort, void, (S32 parentId, bool traverseHierarchy, bool parentsFirst, bool caseSensitive), (0, false, false, true),
+   "Sorts all items of the given parent (or root).  With 'hierarchy', traverses hierarchy."
+   "@param parentId	TreeItemID of parent/root to sort all the items under. Use 0 to sort the entire tree."
+   "@param traverseHierarchy True to traverse the hierarchy, false to not."
+   "@param parentsFirst True to sort the parents first."
+   "@param caseSensitive True to pay attention to case, false to ignore it.")
 {
       
-   if( !parent )
+   if( !parentId )
       object->sortTree( caseSensitive, traverseHierarchy, parentsFirst );
    else
    {
-      GuiTreeViewCtrl::Item* item = object->getItem( parent );
+      GuiTreeViewCtrl::Item* item = object->getItem( parentId );
       if( !item )
       {
-         Con::errorf( "GuiTreeViewCtrl::sort - no item '%i' in tree", parent );
+         Con::errorf( "GuiTreeViewCtrl::sort - no item '%i' in tree", parentId );
          return;
       }
       
@@ -5312,29 +5409,33 @@ void GuiTreeViewCtrl::showItemRenameCtrl( Item* item )
    }
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, cancelRename, void, (), , "For internal use." )
+DefineEngineMethod( GuiTreeViewCtrl, cancelRename, void, (), , "Cancel renaming an item (For internal use).")
 {
    object->cancelRename();
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, onRenameValidate, void, (), , "For internal use." )
+DefineEngineMethod( GuiTreeViewCtrl, onRenameValidate, void, (), , "Validate the new name for an object (For internal use).")
 {
    object->onRenameValidate();
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, showItemRenameCtrl, void, ( S32 id ), , "( TreeItemId id ) - Show the rename text field for the given item (only one at a time)." )
+DefineEngineMethod( GuiTreeViewCtrl, showItemRenameCtrl, void, (S32 itemId), ,
+   "Show the rename text field for the given item (only one at a time)."
+   "@param itemId TreeItemId of item to show rename text field for.")
 {
-   GuiTreeViewCtrl::Item* item = object->getItem( id );
+   GuiTreeViewCtrl::Item* item = object->getItem( itemId );
    if( !item )
    {
-      Con::errorf( "GuiTreeViewCtrl::showItemRenameCtrl - invalid item id '%i'", id );
+      Con::errorf( "GuiTreeViewCtrl::showItemRenameCtrl - invalid item id '%i'", itemId );
       return;
    }
    
    object->showItemRenameCtrl( item );
 }
 
-DefineConsoleMethod( GuiTreeViewCtrl, setDebug, void, ( bool value ), (true), "( bool value=true ) - Enable/disable debug output." )
+DefineEngineMethod( GuiTreeViewCtrl, setDebug, void, (bool value), (true),
+   "Enable/disable debug output."
+   "@param value True to enable debug output, false to disable it.")
 {
       
    object->setDebug( value );

+ 11 - 7
Engine/source/gui/core/guiControl.cpp

@@ -2613,21 +2613,24 @@ DefineEngineMethod( GuiControl, setValue, void, ( const char* value ),,
    object->setScriptValue( value );
 }
 
-//ConsoleMethod( GuiControl, getValue, const char*, 2, 2, "")
-DefineConsoleMethod( GuiControl, getValue, const char*, (), , "")
+DefineEngineMethod( GuiControl, getValue, const char*, (),,
+   "Get the value associated with the control.\n"
+   "@return value for the control.\n" )
 {
    return object->getScriptValue();
 }
 
-//ConsoleMethod( GuiControl, makeFirstResponder, void, 3, 3, "(bool isFirst)")
-DefineConsoleMethod( GuiControl, makeFirstResponder, void, (bool isFirst), , "(bool isFirst)")
+DefineEngineMethod( GuiControl, makeFirstResponder, void, ( bool isFirst ),,
+   "Make this control the first responder.\n"
+   "@param isFirst True to make first responder, false to not.\n" )
 {
    //object->makeFirstResponder(dAtob(argv[2]));
    object->makeFirstResponder(isFirst);
 }
 
-//ConsoleMethod( GuiControl, isActive, bool, 2, 2, "")
-DefineConsoleMethod( GuiControl, isActive, bool, (), , "")
+DefineEngineMethod( GuiControl, isActive, bool, (),,
+   "Check if this control is active or not.\n"
+   "@return True if it's active, false if not.\n" )
 {
    return object->isActive();
 }
@@ -2635,7 +2638,8 @@ DefineConsoleMethod( GuiControl, isActive, bool, (), , "")
 //-----------------------------------------------------------------------------
 
 DefineEngineMethod( GuiControl, setActive, void, ( bool state ), ( true ),
-   "" )
+   "Set the control as active or inactive."
+   "@param state True to set the control as active, false to set it as inactive.")
 {
    object->setActive( state );
 }

+ 5 - 2
Engine/source/gui/core/guiTypes.cpp

@@ -695,9 +695,12 @@ bool GuiControlProfile::loadFont()
    return true;
 }
 
-DefineConsoleMethod( GuiControlProfile, getStringWidth, S32, ( const char * pString ), , "( pString )" )
+DefineEngineMethod( GuiControlProfile, getStringWidth, S32, (const char* string),,
+   "Get the width of the string in pixels.\n"
+   "@param string String to get the width of."
+   "@return width of the string in pixels." )
 {
-    return object->mFont->getStrNWidth( pString, dStrlen( pString ) );
+   return object->mFont->getStrNWidth( string, dStrlen( string ) );
 }
 
 //-----------------------------------------------------------------------------

+ 2 - 2
Engine/source/gui/core/guiTypes.h

@@ -364,7 +364,7 @@ public:
 /// datablock. It is used to control information that does not change
 /// or is unlikely to change during execution of a program. It is also
 /// a level of abstraction between script and GUI control so that you can
-/// use the same control, say a button, and have it look completly different
+/// use the same control, say a button, and have it look completely different
 /// just with a different profile.
 class GuiControlProfile : public SimObject
 {
@@ -376,7 +376,7 @@ public:
 
    U32  mUseCount;                                 ///< Total number of controls currently referencing this profile.
    U32  mLoadCount;                                ///< Number of controls in woken state using this profile; resources for the profile are loaded when this is >0.
-   bool mTabable;                                  ///< True if this object is accessable from using the tab key
+   bool mTabable;                                  ///< True if this object is accessible from using the tab key
 
    bool mCanKeyFocus;                              ///< True if the object can be given keyboard focus (in other words, made a first responder @see GuiControl)
    bool mModal;                                    ///< True if this is a Modeless dialog meaning it will pass input through instead of taking it all

+ 52 - 27
Engine/source/gui/editor/guiInspector.cpp

@@ -771,14 +771,16 @@ void GuiInspector::sendInspectPostApply()
 // MARK: ---- Console Methods ----
 
 //-----------------------------------------------------------------------------
-
-DefineConsoleMethod( GuiInspector, inspect, void, (const char * className), , "Inspect(Object)")
+DefineEngineMethod( GuiInspector, inspect, void, (const char* simObject), (""),
+   "Inspect the given object.\n"
+   "@param simObject Object to inspect.")
 {
-   SimObject * target = Sim::findObject(className);
+   SimObject * target = Sim::findObject(simObject);
    if(!target)
    {
-      if(dAtoi(className) > 0)
-         Con::warnf("GuiInspector::inspect(): invalid object: %s", className);
+      if(dAtoi(simObject) > 0)
+         Con::warnf("%s::inspect(): invalid object: %s", object->getClassName(), simObject);
+
       object->clearInspectObjects();
       return;
    }
@@ -788,12 +790,15 @@ DefineConsoleMethod( GuiInspector, inspect, void, (const char * className), , "I
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, addInspect, void, (const char * className, bool autoSync), (true), "( id object, (bool autoSync = true) ) - Add the object to the list of objects being inspected." )
+DefineEngineMethod( GuiInspector, addInspect, void, (const char* simObject, bool autoSync), (true),
+   "Add the object to the list of objects being inspected.\n"
+   "@param simObject Object to add to the inspection."
+   "@param autoSync Auto sync the values when they change.")
 {
    SimObject* obj;
-   if( !Sim::findObject( className, obj ) )
+   if( !Sim::findObject( simObject, obj ) )
    {
-      Con::errorf( "GuiInspector::addInspect(): invalid object: %s", className );
+      Con::errorf( "%s::addInspect(): invalid object: %s", object->getClassName(), simObject );
       return;
    }
 
@@ -802,15 +807,24 @@ DefineConsoleMethod( GuiInspector, addInspect, void, (const char * className, bo
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, removeInspect, void, (SimObject* obj), , "( id object ) - Remove the object from the list of objects being inspected." )
+DefineEngineMethod( GuiInspector, removeInspect, void, (const char* simObject), ,
+   "Remove the object from the list of objects being inspected.\n"
+   "@param simObject Object to remove from the inspection.")
 {
-   if (obj)
-      object->removeInspectObject( obj );
+   SimObject* obj;
+   if( !Sim::findObject( simObject, obj ) )
+   {
+      Con::errorf( "%s::removeInspect(): invalid object: %s", object->getClassName(), simObject );
+      return;
+   }
+
+   object->removeInspectObject( obj );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, refresh, void, (), , "Reinspect the currently selected object." )
+DefineEngineMethod( GuiInspector, refresh, void, (), ,
+   "Re-inspect the currently selected object.\n")
 {
    if ( object->getNumInspectObjects() == 0 )
       return;
@@ -822,10 +836,13 @@ DefineConsoleMethod( GuiInspector, refresh, void, (), , "Reinspect the currently
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, getInspectObject, const char*, (U32 index), (0), "getInspectObject( int index=0 ) - Returns currently inspected object" )
+DefineEngineMethod( GuiInspector, getInspectObject, const char*, (S32 index), (0),
+   "Returns currently inspected object.\n"
+   "@param index Index of object in inspection list you want to get."
+   "@return object being inspected.")
 {
       
-   if( index >= object->getNumInspectObjects() )
+   if( index < 0 || index >= object->getNumInspectObjects() )
    {
       Con::errorf( "GuiInspector::getInspectObject() - index out of range: %i", index );
       return "";
@@ -836,46 +853,54 @@ DefineConsoleMethod( GuiInspector, getInspectObject, const char*, (U32 index), (
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, getNumInspectObjects, S32, (), , "() - Return the number of objects currently being inspected." )
+DefineEngineMethod( GuiInspector, getNumInspectObjects, S32, (), ,
+   "Return the number of objects currently being inspected.\n"
+   "@return number of objects currently being inspected.")
 {
    return object->getNumInspectObjects();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, setName, void, (const char * newObjectName), , "setName(NewObjectName)")
+DefineEngineMethod( GuiInspector, setName, void, (const char* newObjectName), ,
+	"Rename the object being inspected (first object in inspect list).\n"
+	"@param newObjectName new name for object being inspected.")
 {
    object->setName(newObjectName);
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, apply, void, (), , "apply() - Force application of inspected object's attributes" )
+DefineEngineMethod( GuiInspector, apply, void, (), ,
+	"Force application of inspected object's attributes.\n")
 {
    object->sendInspectPostApply();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( GuiInspector, setObjectField, void, (const char * fieldname, const char * data ), , 
-   "setObjectField( fieldname, data ) - Set a named fields value on the inspected object if it exists. This triggers all the usual callbacks that would occur if the field had been changed through the gui." )
+DefineEngineMethod( GuiInspector, setObjectField, void, (const char* fieldname, const char* data ), ,
+	"Set a named fields value on the inspected object if it exists. This triggers all the usual callbacks that would occur if the field had been changed through the gui..\n"
+	"@param fieldname Field name on object we are inspecting we want to change."
+	"@param data New Value for the given field.")
 {
    object->setObjectField( fieldname, data );
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleStaticMethod( GuiInspector, findByObject, S32, (const char * className ), , 
-   "findByObject( SimObject ) - returns the id of an awake inspector that is inspecting the passed object if one exists." )
+DefineEngineMethod( GuiInspector, findByObject, S32, (SimObject* object), ,
+	"Returns the id of an awake inspector that is inspecting the passed object if one exists\n"
+	"@param object Object to find away inspector for."
+	"@return id of an awake inspector that is inspecting the passed object if one exists, else NULL or 0.")
 {
-   SimObject *obj;
-   if ( !Sim::findObject( className, obj ) )   
+   if ( !object )
       return NULL;
-   
-   obj = GuiInspector::findByObject( obj );
 
-   if ( !obj )
+   SimObject *inspector = GuiInspector::findByObject( object );
+
+   if ( !inspector )
       return NULL;
 
-   return obj->getId();      
+   return inspector->getId();
 }

+ 10 - 4
Engine/source/gui/worldEditor/terrainEditor.cpp

@@ -2920,9 +2920,15 @@ void TerrainEditor::autoMaterialLayer( F32 mMinHeight, F32 mMaxHeight, F32 mMinS
    mUndoSel = 0;  
   
    scheduleMaterialUpdate();     
-}  
-  
-DefineConsoleMethod( TerrainEditor, autoMaterialLayer, void, (F32 minHeight, F32 maxHeight, F32 minSlope, F32 maxSlope, F32 coverage), , "(F32 minHeight, F32 maxHeight, F32 minSlope, F32 maxSlope , F32 coverage)")  
-{  
+}
+
+DefineEngineMethod( TerrainEditor, autoMaterialLayer, void, (F32 minHeight, F32 maxHeight, F32 minSlope, F32 maxSlope, F32 coverage),,
+   "Rule based terrain painting.\n"
+   "@param minHeight Minimum terrain height."
+   "@param maxHeight Maximum terrain height."
+   "@param minSlope Minimum terrain slope."
+   "@param maxSlope Maximum terrain slope."
+   "@param coverage Terrain coverage amount.")
+{
    object->autoMaterialLayer( minHeight,maxHeight, minSlope, maxSlope, coverage );  
 }

+ 8 - 4
Engine/source/gui/worldEditor/undoActions.cpp

@@ -58,10 +58,12 @@ void MECreateUndoAction::addObject( SimObject *object )
    mObjects.last().id = object->getId();
 }
 
-DefineConsoleMethod( MECreateUndoAction, addObject, void, (SimObject *obj), , "( SimObject obj )")
+DefineEngineMethod( MECreateUndoAction, addObject, void, ( SimObject* obj),,
+   "Add the object being created to an undo action.\n"
+   "@param obj Object being created you want to create the undo for.")
 {
 	if (obj)
-   	object->addObject( obj );
+      object->addObject( obj );
 }
 
 void MECreateUndoAction::undo()
@@ -163,10 +165,12 @@ void MEDeleteUndoAction::deleteObject( const Vector<SimObject*> &objectList )
       deleteObject( objectList[i] );
 }
 
-DefineConsoleMethod( MEDeleteUndoAction, deleteObject, void, (SimObject *obj ), , "( SimObject obj )")
+DefineEngineMethod( MEDeleteUndoAction, deleteObject, void, ( SimObject* obj),,
+   "Delete the object and add it to the undo action.\n"
+   "@param obj Object to delete and add to the undo action.")
 {
 	if (obj)
-   	object->deleteObject( obj );
+      object->deleteObject( obj );
 }
 
 void MEDeleteUndoAction::undo()

+ 149 - 81
Engine/source/gui/worldEditor/worldEditor.cpp

@@ -2879,15 +2879,6 @@ const Point3F& WorldEditor::getSelectionCentroid()
    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()
 {
    return mSelected->getBoxBounds();
@@ -3187,17 +3178,21 @@ ConsoleMethod( WorldEditor, ignoreObjClass, void, 3, 0, "(string class_name, ...
 	object->ignoreObjClass(argc, argv);
 }
 
-DefineConsoleMethod( WorldEditor, clearIgnoreList, void, (), , "")
+DefineEngineMethod( WorldEditor, clearIgnoreList, void, (),,
+   "Clear the ignore class list.\n")
 {
 	object->clearIgnoreList();
 }
 
-DefineConsoleMethod( WorldEditor, clearSelection, void, (), , "")
+DefineEngineMethod( WorldEditor, clearSelection, void, (),,
+   "Clear the selection.\n")
 {
 	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() )
       return 0;
@@ -3205,35 +3200,47 @@ DefineConsoleMethod( WorldEditor, getActiveSelection, S32, (), , "() - Return th
    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)
    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();
    if(sel)
 	   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();
 }
 
-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())
    {
@@ -3244,22 +3251,30 @@ DefineConsoleMethod( WorldEditor, getSelectedObject, S32, (S32 index), , "(int i
    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();
 }
 
-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();
 }
 
-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 );
@@ -3275,17 +3290,20 @@ void WorldEditor::copyCurrentSelection()
 	copySelection(mSelected);	
 }
 
-DefineConsoleMethod( WorldEditor, cutSelection, void, (),, "")
+DefineEngineMethod( WorldEditor, cutSelection, void, (), ,
+	"Cut the current selection to be pasted later.")
 {
    object->cutCurrentSelection();
 }
 
-DefineConsoleMethod( WorldEditor, copySelection, void, (),, "")
+DefineEngineMethod( WorldEditor, copySelection, void, (), ,
+	"Copy the current selection to be pasted later.")
 {
    object->copyCurrentSelection();
 }
 
-DefineConsoleMethod( WorldEditor, pasteSelection, void, (),, "")
+DefineEngineMethod( WorldEditor, pasteSelection, void, (), ,
+	"Paste the current selection.")
 {
    object->pasteSelection();
 }
@@ -3295,149 +3313,182 @@ bool WorldEditor::canPasteSelection()
 	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();
 }
 
-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)
    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);
 }
 
-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);
 }
 
-DefineConsoleMethod( WorldEditor, alignByBounds, void, (S32 boundsAxis), , "(int boundsAxis)"
-              "Align all selected objects against the given bounds axis.")
+//TODO: Put in the param possible options and what they mean
+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))
 		Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByBounds: invalid bounds axis '%s'", boundsAxis));
 }
 
-DefineConsoleMethod( WorldEditor, alignByAxis, void, (S32 boundsAxis), , "(int axis)"
-              "Align all selected objects along the given axis.")
+//TODO: Put in the param possible options and what they mean (assuming x,y,z)
+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))
-		Con::warnf(ConsoleLogEntry::General, avar("worldEditor.alignByAxis: invalid axis '%s'", boundsAxis));
+	if(!object->alignByAxis(axis))
+		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();
 }
 
-DefineConsoleMethod( WorldEditor, resetSelectedScale, void, (),, "")
+DefineEngineMethod( WorldEditor, resetSelectedScale, void, (), ,
+	"Reset the scale of the selection.")
 {
 	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);
 }
 
-DefineConsoleMethod( WorldEditor, addUndoState, void, (),, "")
+DefineEngineMethod( WorldEditor, addUndoState, void, (), ,
+	"Adds/Submits an undo state to the undo manager.")
 {
 	object->addUndoState();
 }
 
 //-----------------------------------------------------------------------------
 
-DefineConsoleMethod( WorldEditor, getSoftSnap, bool, (),, "getSoftSnap()\n"
-              "Is soft snapping always on?")
+DefineEngineMethod( WorldEditor, getSoftSnap, bool, (), ,
+	"Is soft snapping always on?"
+	"@return True if soft snap is on, false if not.")
 {
 	return object->mSoftSnap;
 }
 
-DefineConsoleMethod( WorldEditor, setSoftSnap, void, (bool enable), , "setSoftSnap(bool)\n"
-              "Allow soft snapping all of the time.")
+DefineEngineMethod( WorldEditor, setSoftSnap, void, (bool softSnap), ,
+	"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"
-              "Get the absolute size to trigger a soft snap.")
+DefineEngineMethod( WorldEditor, getSoftSnapSize, F32, (), ,
+	"Get the absolute size to trigger a soft snap."
+	"@return absolute size to trigger a soft snap.")
 {
 	return object->mSoftSnapSize;
 }
 
-DefineConsoleMethod( WorldEditor, setSoftSnapSize, void, (F32 size), , "setSoftSnapSize(F32)\n"
-              "Set the absolute size to trigger a soft snap.")
+DefineEngineMethod( WorldEditor, setSoftSnapSize, void, (F32 size), ,
+	"Set the absolute size to trigger a soft snap."
+	"@param size Absolute size to trigger a soft snap.")
 {
 	object->mSoftSnapSize = size;
 }
 
 DefineEngineMethod( WorldEditor, getSoftSnapAlignment, WorldEditor::AlignmentType, (),,
-   "Get the soft snap alignment." )
+	"Get the soft snap alignment."
+	"@return soft snap alignment.")
 {
    return object->mSoftSnapAlignment;
 }
 
 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;
 }
 
-DefineConsoleMethod( WorldEditor, softSnapSizeByBounds, void, (bool enable), , "softSnapSizeByBounds(bool)\n"
-              "Use selection bounds size as soft snap bounds.")
+DefineEngineMethod( WorldEditor, softSnapSizeByBounds, void, (bool useBounds), ,
+	"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"
-              "The fraction of the soft snap radius that backfaces may be included.")
+DefineEngineMethod( WorldEditor, getSoftSnapBackfaceTolerance, F32, (),,
+	"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;
 }
 
-DefineConsoleMethod( WorldEditor, setSoftSnapBackfaceTolerance, void, (F32 range), , "setSoftSnapBackfaceTolerance(F32 with range of 0..1)\n"
-              "The fraction of the soft snap radius that backfaces may be included.")
+DefineEngineMethod( WorldEditor, setSoftSnapBackfaceTolerance, void, (F32 tolerance),,
+	"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"
-              "Render the soft snapping bounds.")
+DefineEngineMethod( WorldEditor, softSnapRender, void, (F32 render),,
+	"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"
-              "Render the soft snapped triangle.")
+DefineEngineMethod( WorldEditor, softSnapRenderTriangle, void, (F32 renderTriangle),,
+	"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"
-              "Toggle soft snapping debug rendering.")
+DefineEngineMethod( WorldEditor, softSnapDebugRender, void, (F32 debugRender),,
+	"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, (),,
-   "Get the terrain snap alignment. " )
+   "Get the terrain snap alignment."
+   "@return terrain snap alignment type.")
 {
    return object->mTerrainSnapAlignment;
 }
 
 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;
 }
 
-DefineConsoleMethod( WorldEditor, transformSelection, void, 
+DefineEngineMethod( WorldEditor, transformSelection, void, 
                    ( bool position,
                      Point3F point,
                      bool relativePos,
@@ -3449,8 +3500,18 @@ DefineConsoleMethod( WorldEditor, transformSelection, void,
                      Point3F scale,
                      bool sRelative,
                      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);
 }
@@ -3525,9 +3586,10 @@ void WorldEditor::colladaExportSelection( const String &path )
 #endif
 }
 
-DefineConsoleMethod( WorldEditor, colladaExportSelection, void, (const char * path), , 
-              "( String path ) - Export the combined geometry of all selected objects to the specified path in collada format." )
-{  
+DefineEngineMethod( WorldEditor, colladaExportSelection, void, ( const char* path ),,
+	"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 );
 }
 
@@ -3679,17 +3741,23 @@ void WorldEditor::explodeSelectedPrefab()
    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 );
 }
 
-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();
 }
 
-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)
 		return;

+ 0 - 1
Engine/source/gui/worldEditor/worldEditor.h

@@ -92,7 +92,6 @@ class WorldEditor : public EditTSCtrl
       S32 getSelectionSize();
       S32 getSelectObject(S32 index);	
       const Point3F& getSelectionCentroid();
-      const char* getSelectionCentroidText();
       const Box3F& getSelectionBounds();
       Point3F getSelectionExtent();
       F32 getSelectionRadius();

+ 1 - 0
Engine/source/platformWin32/winExec.cpp

@@ -141,6 +141,7 @@ DefineConsoleFunction( shellExecute, bool, (const char * executable, const char
 				"@param executable Name of the executable or batch file\n"
 				"@param args Optional list of arguments, in string format, to pass to the executable\n"
 				"@param directory Optional string containing path to output or shell\n"
+				"@return true if executed, false if not\n"
 				"@ingroup Platform")
 {
    ExecuteThread *et = new ExecuteThread( executable, args, directory );