#include <maya/MFnPlugin.h>
#include <maya/MStatus.h>
#include <maya/MPxCommand.h>
#include <maya/MMessage.h>
#include <maya/MUserEventMessage.h>
#include <maya/MGlobal.h>
#include <maya/MArgList.h>
#include <maya/MArgDatabase.h>
#include <maya/MSyntax.h>
static const char *postFlag = "-p";
static const char *postLongFlag = "-post";
static const char *registerFlag = "-r";
static const char *registerLongFlag = "-register";
static const char *deregisterFlag = "-d";
static const char *deregisterLongFlag = "-deregister";
static const char *testFlag = "-t";
static const char *testLongFlag = "-test";
{
public:
void runTests();
static void *creator();
static void userCallback1(void* clientData);
static void userCallback2(void* clientData);
private:
};
MString userMessage::stringClientData =
"Sample Client Data (an MString object)";
{
if (argData.isFlagSet(deregisterFlag))
{
argData.getFlagArgument(deregisterFlag, 0, event);
}
else if (argData.isFlagSet(registerFlag))
{
argData.getFlagArgument(registerFlag, 0, event);
{
}
}
}
else if (argData.isFlagSet(postFlag))
{
argData.getFlagArgument(postFlag, 0, event);
}
else if (argData.isFlagSet(testFlag))
{
runTests();
}
return status;
}
void* userMessage::creator()
{
return new userMessage;
}
syntax.
addFlag( testFlag, testLongFlag );
return syntax;
}
void userMessage::userCallback1(void* clientData) {
if (clientData != 0)
{
}
}
void userMessage::userCallback2(void* clientData) {
if (clientData != 0)
{
}
}
void userMessage::runTests() {
if (!status) {
}
else {
}
if (!status) {
}
else {
}
}
{
MFnPlugin pluginFn(obj, PLUGIN_COMPANY,
"6.0");
status = pluginFn.registerCommand("userMessage", userMessage::creator, userMessage::newSyntax);
if( !status)
status.
perror(
"register Command failed");
return status;
}
{
status = pluginFn.deregisterCommand("userMessage");
return status;
}