Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro.

This commit is contained in:
Vincent Gee 2014-11-03 22:42:51 -05:00
parent 378a933894
commit acb192e2a5
133 changed files with 1716 additions and 2087 deletions

View file

@ -22,6 +22,7 @@
#include "platform/platform.h"
#include "console/engineAPI.h"
#include "core/volume.h"
#include "ts/collada/colladaUtils.h"
#include "ts/collada/colladaAppNode.h"
@ -125,7 +126,7 @@ static void processNode(GuiTreeViewCtrl* tree, domNode* node, S32 parentID, Scen
}
}
ConsoleFunction( enumColladaForImport, bool, 3, 3,
DefineConsoleFunction( enumColladaForImport, bool, (const char * shapePath, const char * ctrl), ,
"(string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from "
"a COLLADA file and store it in a GuiTreeView control. This function is "
"used by the COLLADA import gui to show a preview of the scene contents "
@ -137,15 +138,15 @@ ConsoleFunction( enumColladaForImport, bool, 3, 3,
"@internal")
{
GuiTreeViewCtrl* tree;
if (!Sim::findObject(argv[2], tree))
if (!Sim::findObject(ctrl, tree))
{
Con::errorf("enumColladaScene::Could not find GuiTreeViewCtrl '%s'", (const char*)argv[2]);
Con::errorf("enumColladaScene::Could not find GuiTreeViewCtrl '%s'", ctrl);
return false;
}
// Check if a cached DTS is available => no need to import the collada file
// if we can load the DTS instead
Torque::Path path((const char*)argv[1]);
Torque::Path path(shapePath);
if (ColladaShapeLoader::canLoadCachedDTS(path))
return false;