#include <MModelMessage.h>


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.
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) |
| 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. | |
| MCallbackId MModelMessage::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 MModelMessage::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 MModelMessage::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 MModelMessage::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 MModelMessage::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 |
| Autodesk® Maya® 2010 © 1997-2009 Autodesk, Inc. All rights reserved. |
Generated with
|