class MDagMessage

Jump to documentation

: public MMessage Dependency graph messages. (OpenMaya) (OpenMaya.py)

Inheritance:

MDagMessage < MMessage

public members:

enum DagMessage
The type of DAG changed messages that have occurred
kInvalidMsg
an invalid message was used.
kParentAdded
a dummy enum used for looping through the message types
kParentRemoved
a parent was removed from a DAG node
kChildAdded
a child was added to a DAG node
kChildRemoved
a child was removed from a DAG node
kChildReordered
a child of a DAG node was reordered
kInstanceAdded
a DAG node was instanced
kInstanceRemoved
a DAG node instance was removed
kLast
last value of the enum
static MCallbackId addParentAddedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addParentAddedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addParentRemovedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addParentRemovedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildAddedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildAddedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildRemovedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildRemovedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildReorderedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addChildReorderedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addDagCallback ( DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addDagDagPathCallback ( MDagPath &dagPath, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addAllDagChangesCallback ( MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addAllDagChangesDagPathCallback ( MDagPath &dagPath, MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addInstanceAddedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addInstanceAddedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addInstanceRemovedCallback ( MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addInstanceRemovedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
static MCallbackId addParentAddedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addParentRemovedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addChildAddedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addChildRemovedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addChildReorderedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addInstanceAddedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addInstanceRemovedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addDagCallback ( DagMessage msgType, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addDagCallback ( MDagPath &dagPath, DagMessage msgType, MMessage::MParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addDagCallback ( MDagPath &dagPath, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT
static MCallbackId addAllDagChangesCallback ( MDagPath &dagPath, MDagMessage::MMessageParentChildFunction func, void * clientData = NULL, MStatus * ReturnStatus = NULL )
OBSOLETE and NO SCRIPT SUPPORT

Inherited from MMessage:

public members:

static MStatus removeCallback ( MCallbackId id )
static MStatus removeCallbacks ( MCallbackIdArray &ids )
static MCallbackId currentCallbackId ( MStatus * ReturnStatus = NULL )
static MStatus nodeCallbacks ( MObject & node, MCallbackIdArray & ids )
static void setRegisteringCallableScript ()
static bool registeringCallableScript ()
static MStatus removeCallbacks ( MIntArray &ids )
static MStatus nodeCallbacks ( MObject & node, MIntArray & ids )

Documentation

Dependency graph messages. (OpenMaya) (OpenMaya.py)
Description

This class is used to register callbacks for dependency graph messages.

There are 6 types of add callback methods which will add callbacks for the following messages

Methods exist to register callbacks for every time any DAG node is affected as well as methods that work on specific nodes. Each method returns an id which 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.

Functions

MCallbackId MDagMessage:: addParentAddedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a parent is added in the DAG.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addParentAddedCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addParentAddedDagPathCallback.

MCallbackId MDagMessage:: addParentAddedDagPathCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a parent is added to the specified DAG node..

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addParentRemovedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a parent is removed in the DAG.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addParentRemovedCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addParentRemovedDagPathCallback.

MCallbackId MDagMessage:: addParentRemovedDagPathCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a parent is removed from the specified DAG node.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildAddedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child is added in the DAG.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildAddedCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addChildAddedDagPathCallback.

MCallbackId MDagMessage:: addChildAddedDagPathCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child is added to the specified DAG node.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildRemovedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child is removed in the DAG.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildRemovedCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addChildRemovedDagPathCallback.

MCallbackId MDagMessage:: addChildRemovedDagPathCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child is removed from the specified DAG node.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildReorderedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child is reordered in the DAG.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addChildReorderedCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addChildReorderedDagPathCallback.

MCallbackId MDagMessage:: addChildReorderedDagPathCallback ( MDagPath &node, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a child of the specified DAG node is reordered.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addDagCallback ( DagMessage msgType, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a DAG change is made.

Arguments

  • DagMessage The type of DAG change to trigger the callback
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addDagCallback ( MDagPath &dagPath, DagMessage msgType, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a DAG change is made to a specified node.

Arguments

  • node The DAG node to register the callback for
  • DagMessage The type of DAG change to trigger the callback
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addDagCallback ( DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called for specified DAG changes on all nodes. The callbck will also receive the DagMessage.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addDagDagPathCallback ( MDagPath &dagPath, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called for specified a DAG change is made to the specified DAG path. The callback receives the DagMessage as well.

Arguments

  • node The DAG node to register the callback for
  • DagMessage The type of DAG change to trigger the callback
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addDagCallback ( MDagPath &dagPath, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addDagDagPathCallback.

MCallbackId MDagMessage:: addAllDagChangesCallback ( MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever any DAG change is made to any DAG node.

Arguments

  • node The DAG node to register the callback for
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addAllDagChangesCallback ( MDagPath &dagPath, MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addAllDagChangesDagPathCallback.

MCallbackId MDagMessage:: addAllDagChangesDagPathCallback ( MDagPath &dagPath, MDagMessage::MMessageParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever a DAG change is made to the specified DAG path.

Arguments

  • node The DAG node to register the callback for
  • DagMessage The type of DAG change to trigger the callback
  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addInstanceAddedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever any node in the DAG is instanced

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addInstanceAddedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addInstanceAddedDagPathCallback.

MCallbackId MDagMessage:: addInstanceAddedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever the specified node is instanced

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addInstanceRemovedCallback ( MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever an instance of any DAG node is removed or deleted.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MDagMessage:: addInstanceRemovedCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

THIS IS AN OBSOLETE METHOD AND HAS BEEN REPLACED BY addInstanceRemovedDagPathCallback.

MCallbackId MDagMessage:: addInstanceRemovedDagPathCallback ( MDagPath &dagPath, MMessage::MParentChildFunction func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever an instance of the specified node is removed.

Arguments

  • func the callback function
    • child The child involved in the change
    • parent The parent involved in the change
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright