#include <maya/MFnPlugin.h>
#include <maya/MStatus.h>
#include <maya/MPxCommand.h>
#include <maya/MMessage.h>
#include <maya/MEventMessage.h>
#include <maya/MGlobal.h>
#include <maya/MArgList.h>
#include <maya/MCallbackIdArray.h>
#define UndoString "Undo"
#define RedoString "Redo"
{
public:
void runTests();
static void *creator();
};
static void undoCB( void *clientData )
{
MString info =
"undoCallback : clientData = ";
if ( clientData )
info += (unsigned)(MUintPtrSz)clientData;
else
info += "NULL";
}
static void redoCB( void *clientData )
{
MString info =
"redoCallback : clientData ";
if ( clientData )
info += (unsigned)(MUintPtrSz) clientData;
else
info += "NULL";
}
{
{
unsigned last = args.
length();
for ( unsigned i = 0; i < last; i++ )
{
if ( argStr == "add" )
{
if ( MS::kSuccess != result )
return MS::kFailure;
if ( MS::kSuccess != result )
return MS::kFailure;
}
else if ( argStr == "remove" )
{
return MS::kFailure;
}
else
{
return MS::kFailure;
}
}
}
return result;
}
void* undoRedoMsg::creator()
{
return new undoRedoMsg;
}
{
MFnPlugin pluginFn(obj, PLUGIN_COMPANY,
"6.0");
status = pluginFn.registerCommand("undoRedoMsg", undoRedoMsg::creator);
if( !status)
status.
perror(
"register Command failed");
return status;
}
{
status = pluginFn.deregisterCommand("undoRedoMsg");
return status;
}