#include <MDGMessage.h>
This class is used to register callbacks for dependency graph messages.
There are 4 add callback methods which will add callbacks for the following messages
To remove a callback use MMessage::removeCallback. All callbacks that are registered by a plug-in must be removed by that plug-in when it is unloaded. Failure to do so will result in a fatal error.
Static Public Member Functions | |
static MCallbackId | addTimeChangeCallback (MMessage::MTimeFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
TimeChange callback. | |
static MCallbackId | addForceUpdateCallback (MMessage::MTimeFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
ForceUpdate callback. | |
static MCallbackId | addNodeAddedCallback (MMessage::MNodeFunction func, const MString &nodeType="dependNode", void *clientData=NULL, MStatus *ReturnStatus=NULL) |
NodeAdded callback. | |
static MCallbackId | addNodeRemovedCallback (MMessage::MNodeFunction func, const MString &nodeType="dependNode", void *clientData=NULL, MStatus *ReturnStatus=NULL) |
NodeRemoved callback. | |
static MCallbackId | addConnectionCallback (MMessage::MPlugFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Connection callback. | |
static MCallbackId | addPreConnectionCallback (MMessage::MPlugFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Pre-Connection callback. |
MCallbackId MDGMessage::addTimeChangeCallback | ( | MMessage::MTimeFunction | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
TimeChange callback.
This method registers a callback that is called whenever the time changes in the dependency graph.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId MDGMessage::addForceUpdateCallback | ( | MMessage::MTimeFunction | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
ForceUpdate callback.
This method registers a callback that is called after the time changes and after all nodes have been evaluated in the dependency graph.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId MDGMessage::addNodeAddedCallback | ( | MMessage::MNodeFunction | func, | |
const MString & | nodeType = "dependNode" , |
|||
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
NodeAdded callback.
This method registers a callback that is called whenever a new node is added to the dependency graph. The nodeType argument allows you to specify the type of nodes that will trigger the callback. The default node type is "dependNode" which matches all nodes.
[in] | func | the callback function |
[in] | nodeType | Type of node that will trigger the callback |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId MDGMessage::addNodeRemovedCallback | ( | MMessage::MNodeFunction | func, | |
const MString & | nodeType = "dependNode" , |
|||
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
NodeRemoved callback.
This method registers a callback that is called whenever a new node is removed from the dependency graph. The nodeType argument allows you to specify the type of nodes that will trigger the callback. The default node type is "dependNode" which matches all nodes.
[in] | func | the callback function |
[in] | nodeType | Type of node that will trigger the callback |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId MDGMessage::addConnectionCallback | ( | MMessage::MPlugFunction | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
Connection callback.
This method registers a callback that is called whenever a connection is made or broken in the dependency graph. This callback is triggered after the given connection has been made or broken, unlike the addPreConnectionCallback which is triggered before the operation.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId MDGMessage::addPreConnectionCallback | ( | MMessage::MPlugFunction | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
Pre-Connection callback.
This method registers a callback that is called whenever any connection is made or broken in the dependency graph. This callback is triggered before the given connection has been made or broken, unlike the addConnectionCallback which is triggered after the operation.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |