Scene messages.
This class is used to register callbacks for model related messages.
The addCallback method registers a function that will be executed whenever the specified message occurs. An id is returned and is used to remove the callback.
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.
#include <MModelMessage.h>
Public Types |
|
enum | Message { kActiveListModified } |
Message types supported by the addCallback method. More... |
|
Static Public Member Functions |
|
static MCallbackId | addCallback (Message, MMessage::MBasicFunction, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Adds a new callback for the specified model
message. |
|
static MCallbackId | addBeforeDuplicateCallback (MMessage::MBasicFunction, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Before duplicate callback. |
|
static MCallbackId | addAfterDuplicateCallback (MMessage::MBasicFunction, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
After duplicate callback. |
|
static MCallbackId | addNodeAddedToModelCallback (const MObject &dagNode, MMessage::MNodeFunction, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Node added to model message. |
|
static MCallbackId | addNodeRemovedFromModelCallback (const MObject &dagNode, MMessage::MNodeFunction, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
Node removed from model message. |
|
static const char * | className () |
Returns the name of this class. |
enum Message |
Message types supported by the addCallback method.
MCallbackId addCallback | ( | MModelMessage::Message | msg, |
MMessage::MBasicFunction | func, | ||
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
Adds a new callback for the specified model message.
[in] | msg | the model message that will trigger the callback |
[in] | func | the callback function |
[in] | clientData | user data that will be passed to the callback function |
[out] | ReturnStatus | Status code |
MCallbackId addBeforeDuplicateCallback | ( | MMessage::MBasicFunction | func, |
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
Before duplicate callback.
This method registers a callback that is called whenever a duplicate command is made.
The callback will be called before anything is duplicated.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId addAfterDuplicateCallback | ( | MMessage::MBasicFunction | func, |
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
After duplicate callback.
This method registers a callback that is called after a duplicate command is made.
The callback will be called after everything is duplicated.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId addNodeAddedToModelCallback | ( | const MObject & | dagNode, |
MMessage::MNodeFunction | func, | ||
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
Node added to model message.
This method registers a callback that is called when a dag node is about to be added to the Maya model.
[in] | dagNode | Node that should acquire the callback |
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
MCallbackId addNodeRemovedFromModelCallback | ( | const MObject & | dagNode, |
MMessage::MNodeFunction | func, | ||
void * | clientData = NULL , |
||
MStatus * | ReturnStatus =
NULL |
||
) | [static] |
Node removed from model message.
This method registers a callback that is called when the specified dag node is being removed from the Maya model.
[in] | dagNode | Node that should acquire the callback |
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[out] | ReturnStatus | status code |
const char * className | ( | ) | [static] |