OpenMaya.MModelMessage Class Reference

OpenMaya.MModelMessage Class Reference

Class Description

Class used to register callbacks for model related messages.The class also provides the following Message constants which
describe the different types supported by the addCallback method:
  kActiveListModified           #active selection changes

Method resolution order:
-   MModelMessage
-   MMessage
-   __builtin__.object
+ Inheritance diagram for OpenMaya.MModelMessage:

Static Public Member Functions

addAfterDuplicateCallback ()
 
addBeforeDuplicateCallback ()
 
addCallback ()
 
addNodeAddedToModelCallback ()
 
addNodeRemovedFromModelCallback ()
 
- Static Public Member Functions inherited from OpenMaya.MMessage
currentCallbackId ()
 
nodeCallbacks ()
 
removeCallback ()
 
removeCallbacks ()
 

Static Public Attributes

int kActiveListModified = 0
 
- Static Public Attributes inherited from OpenMaya.MMessage
int kDefaultAction = 0
 
int kDoAction = 2
 
int kDoNotDoAction = 1
 

Member Function Documentation

OpenMaya.MModelMessage.addAfterDuplicateCallback ( )
static
addAfterDuplicateCallback(function, clientData=None) -> id

This method registers a callback that is called after a duplicate
command is made. The callback will be called after everything is
duplicated.

 * function - callable which will be passed the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
OpenMaya.MModelMessage.addBeforeDuplicateCallback ( )
static
addBeforeDuplicateCallback(function, clientData=None) -> id

This method registers a callback that is called whenever a duplicate
command is made. The callback will be called before anything is
duplicated.

 * function - callable which will be passed the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
OpenMaya.MModelMessage.addCallback ( )
static
addCallback(message, function, clientData=None) -> id

Adds a new callback for the specified model message.


 * message (Message constant, see class doc for a list) - the model
   message that will trigger the callback
 * function - callable which will be passed the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
OpenMaya.MModelMessage.addNodeAddedToModelCallback ( )
static
addNodeAddedToModelCallback(dagNode, function, clientData=None) -> id

This method registers a callback that is called when a dag node is about
to be added to the Maya model.

 * dagNode (MObject) - Node that should acquire the callback
 * function - callable which will be passed a MObject indicating
   the node being added to the model and the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
OpenMaya.MModelMessage.addNodeRemovedFromModelCallback ( )
static
addNodeRemovedFromModelCallback(dagNode, function, clientData=None) -> id

This method registers a callback that is called when the
specified dag node is being removed from the Maya model.

 * dagNode (MObject) - Node that should acquire the callback
 * function - callable which will be passed a MObject indicating
   the node being removed to the model and the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.