Python API 2.0 Reference
OpenMaya.MDGMessage Class Reference
+ Inheritance diagram for OpenMaya.MDGMessage:

Static Public Member Functions

def addConnectionCallback ()
 
def addDelayedTimeChangeCallback ()
 
def addDelayedTimeChangeRunupCallback ()
 
def addForceUpdateCallback ()
 
def addNodeAddedCallback ()
 
def addNodeChangeUuidCheckCallback ()
 
def addNodeRemovedCallback ()
 
def addPreConnectionCallback ()
 
def addTimeChangeCallback ()
 
- Static Public Member Functions inherited from OpenMaya.MMessage
def currentCallbackId ()
 
def nodeCallbacks ()
 
def removeCallback ()
 
def removeCallbacks ()
 

Additional Inherited Members

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

Detailed Description

Class used to register callbacks for Dependency Graph related messages.

Method resolution order:
-   MDGMessage
-   MMessage
-   builtins.object

Member Function Documentation

def OpenMaya.MDGMessage.addConnectionCallback ( )
static
addConnectionCallback(function, clientData=None) -> id

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.

 * function - callable which will be passed a MPlug indicating the source
   plug of the connection, a MPlug indicating the destination plug of the
   connection, a boolean set to True if a new connection will be made,
   False if it will be broken and the clientData object.
 * clientData - User defined data passed to the callback function

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

This method registers a callback that is called whenever the time
changes in the dependency graph, but after the time changed callback.

 * function - callable which will be passed a MTime object indicating
   the new time and the clientData object
 * clientData - User defined data passed to the callback function

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

This method registers a callback that is called whenever the time
changes in the dependency graph, but after the other time changed callbacks
which can be used to invoke a dynamics solve or runup if needed

 * function - callable which will be passed a MTime object indicating
   the new time and the clientData object
 * clientData - User defined data passed to the callback function

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

This method registers a callback that is called after the time
changes and after all nodes have been evaluated in the
dependency graph.

 * function - callable which will be passed a MTime object indicating
   the new time and the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
def OpenMaya.MDGMessage.addNodeAddedCallback ( )
static
addNodeAddedCallback(function, nodeType, clientData=None) -> id

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.

 * function - callable which will be passed a MObject indicating
   the new node and the clientData object
 * nodeType (MString) - type of node that will trigger the callback
 * clientData - User defined data passed to the callback function

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

This method registers a callback that is called whenever a node
may have its UUID changed. Possible causes include the 'rename' command,
and the UUID for a node being read from a file during file I/O.

Note that nodes are assigned a UUID when they are created; this does
not invoke this callback. During file I/O the stored UUID is applied as
a separate step after creation (which does invoke this callback).

Depending on the situation Maya may or may not use the new UUID by default.
For example, when importing a file, Maya reads the UUID from the file 
but does not use it. The boolean argument to the callback function lets
the callback know whether Maya is intending to use the UUID or not.

The callback returns a MMessage.Action constant:
        * kDefaultAction - The callback does not want to change whether the
          UUID is used or not.
        * kDoNotDoAction - Do not use the new UUID.
        * kDoAction - Use the new UUID.

In any case, the callback may leave the new uuid as is, or may provide
a new uuid of its own choosing to be used instead.

 * function - callable which will be passed a boolean indicating whether
   the UUID will be applied, a MObject indicating the node whose UUID may
   be changed, the MUuid that may be applied to the node (typically the one
   read from the file, during file I/O) - the callback may provide its own
   uuid to be applied by changing this parameter - and the clientData object.
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.
def OpenMaya.MDGMessage.addNodeRemovedCallback ( )
static
addNodeRemovedCallback(function, nodeType, clientData=None) -> id

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.

 * function - callable which will be passed a MObject indicating
   the node being removed and the clientData object
 * nodeType (MString) - type of node that will trigger the callback
 * clientData - User defined data passed to the callback function

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

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.

 * function - callable which will be passed a MPlug indicating the source
   plug of the connection, a MPlug indicating the destination plug of the
   connection, a boolean set to True if a new connection will be made,
   False if it will be broken and the clientData object.
 * clientData - User defined data passed to the callback function

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

This method registers a callback that is called whenever the time
changes in the dependency graph.

 * function - callable which will be passed a MTime object indicating
   the new time and the clientData object
 * clientData - User defined data passed to the callback function

 * return: Identifier used for removing the callback.