#include <maya/MFnPlugin.h>
#include <maya/MStatus.h>
#include <maya/MPxCommand.h>
#include <maya/MMessage.h>
#include <maya/MNodeMessage.h>
#include <maya/MDGMessage.h>
#include <maya/MGlobal.h>
#include <maya/MArgList.h>
#include <maya/MArgDatabase.h>
#include <maya/MSyntax.h>
#include <maya/MSelectionList.h>
#include <maya/MFnDependencyNode.h>
#include <maya/MDGModifier.h>
#include <maya/MPlugArray.h>
#include <maya/MPlug.h>
#include <maya/MCallbackIdArray.h>
{
public:
static void *creator();
static void removeCallbacks();
void* clientData);
static void preRemovalCB(
MObject& node,
void* clientData);
static void removeCB(
MObject& node,
void* clientData);
private:
static bool nodeRemovedCBRegistered;
};
bool deletedMessage::nodeRemovedCBRegistered = false;
{
argData.getObjects(objects);
for (
unsigned int i = 0; i < objects.
length(); i++) {
callbackIds.append(
);
if (!status) {
continue;
}
callbackIds.append(
);
if (!status) {
continue;
}
if (!nodeRemovedCBRegistered)
{
callbackIds.append(
);
if (!status) {
continue;
}
nodeRemovedCBRegistered = true;
}
}
return status;
}
void* deletedMessage::creator()
{
return new deletedMessage;
}
MSyntax deletedMessage::newSyntax() {
return syntax;
}
void deletedMessage::aboutToDeleteCB(
MObject& node,
MDGModifier& modifier,
void* clientData) {
}
void deletedMessage::preRemovalCB(
MObject& node,
void* clientData) {
}
void deletedMessage::removeCB(
MObject& node,
void* clientData) {
}
void deletedMessage::removeCallbacks() {
}
{
MFnPlugin pluginFn(obj, PLUGIN_COMPANY,
"6.0");
status = pluginFn.registerCommand("deletedMessage", deletedMessage::creator, deletedMessage::newSyntax);
if( !status)
status.
perror(
"register Command failed");
return status;
}
{
deletedMessage::removeCallbacks();
status = pluginFn.deregisterCommand("deletedMessage");
return status;
}