C++ API Reference
MDagMessage Class Reference

DAG messages. More...

#include <MDagMessage.h>

+ Inheritance diagram for MDagMessage:

Public Types

enum  DagMessage {
  kInvalidMsg = -1, kParentAdded, kParentRemoved, kChildAdded,
  kChildRemoved, kChildReordered, kInstanceAdded, kInstanceRemoved,
  kLast
}
 The type of DAG changed messages that have occurred. More...
 
enum  MatrixModifiedFlags {
  kScaleX = 1<<0, kScaleY = 1<<1, kScaleZ = 1<<2, kShearXY = 1<<3,
  kShearXZ = 1<<4, kShearYZ = 1<<5, kRotateX = 1<<6, kRotateY = 1<<7,
  kRotateZ = 1<<8, kTranslateX = 1<<9, kTranslateY = 1<<10, kTranslateZ = 1<<11,
  kScalePivotX = 1<<12, kScalePivotY = 1<<13, kScalePivotZ = 1<<14, kRotatePivotX = 1<<15,
  kRotatePivotY = 1<<16, kRotatePivotZ = 1<<17, kScaleTransX = 1<<18, kScaleTransY = 1<<19,
  kScaleTransZ = 1<<20, kRotateTransX = 1<<21, kRotateTransY = 1<<22, kRotateTransZ = 1<<23,
  kRotateOrientX = 1<<24, kRotateOrientY = 1<<25, kRotateOrientZ = 1<<26, kRotateOrder = 1<<27,
  kAll = (1<<28)-1, kScale = kScaleX | kScaleY | kScaleZ, kShear = kShearXY | kShearXZ | kShearYZ, kRotation = kRotateX | kRotateY | kRotateZ,
  kTranslation = kTranslateX | kTranslateY | kTranslateZ, kScalePivot = kScalePivotX | kScalePivotY | kScalePivotZ, kRotatePivot = kRotatePivotX | kRotatePivotY | kRotatePivotZ, kScalePivotTrans =kScaleTransX | kScaleTransY | kScaleTransZ,
  kRotatePivotTrans =kRotateTransX | kRotateTransY | kRotateTransZ, kRotateOrient = kRotateOrientX | kRotateOrientY | kRotateOrientZ
}
 Indicates which parts of a matrix have been modified. More...
 
typedef void(* MMessageParentChildFunction) (MDagMessage::DagMessage msgType, MDagPath &child, MDagPath &parent, void *clientData)
 Pointer to a callback function which takes an MDagMessage, two MDagPaths and a clientData pointer. More...
 
typedef void(* MWorldMatrixModifiedFunction) (MObject &transformNode, MDagMessage::MatrixModifiedFlags &modified, void *clientData)
 Pointer to world matrix modified callback function. More...
 
- Public Types inherited from MMessage
enum  Action { kDefaultAction, kDoNotDoAction, kDoAction }
 Callback result action codes. More...
 
typedef void(* MBasicFunction) (void *clientData)
 Pointer to a basic callback function. More...
 
typedef void(* MElapsedTimeFunction) (float elapsedTime, float lastTime, void *clientData)
 Pointer to an elapsed time callback function. More...
 
typedef void(* MCheckFunction) (bool *retCode, void *clientData)
 Pointer to callback function which returns a true/false result. More...
 
typedef void(* MCheckFileFunction) (bool *retCode, MFileObject &file, void *clientData)
 Pointer to a callback function which takes a file object and returns a result. More...
 
typedef void(* MCheckPlugFunction) (bool *retCode, MPlug &plug, void *clientData)
 Pointer to a callback function which takes a plug and returns a result. More...
 
typedef void(* MComponentFunction) (MUintArray componentIds[], unsigned int count, void *clientData)
 Pointer to a callback function which takes an array of component ids. More...
 
typedef void(* MNodeFunction) (MObject &node, void *clientData)
 Pointer to a callback function which takes a dependency node. More...
 
typedef void(* MStringFunction) (const MString &str, void *clientData)
 Pointer to callback function which takes a string. More...
 
typedef void(* MTwoStringFunction) (const MString &str1, const MString &str2, void *clientData)
 Pointer to a callback function which takes two strings. More...
 
typedef void(* MThreeStringFunction) (const MString &str1, const MString &str2, const MString &str3, void *clientData)
 Pointer to a callback function which takes three strings. More...
 
typedef void(* MStringIntBoolIntFunction) (const MString &str, unsigned int index, bool flag, unsigned int type, void *clientData)
 Pointer to callback function which takes a string, an index, a flag and a type. More...
 
typedef void(* MStringIndexFunction) (const MString &, unsigned int index, void *clientData)
 Pointer to callback function which takes a string and index. More...
 
typedef void(* MNodeStringBoolFunction) (MObject &node, const MString &, bool, void *clientData)
 Pointer to a callback function which takes a node, a string and a boolean. More...
 
typedef void(* MStateFunction) (bool state, void *clientData)
 Pointer to a callback function which takes a boolean state. More...
 
typedef void(* MTimeFunction) (MTime &time, void *clientData)
 Pointer to callback function which takes a time. More...
 
typedef void(* MPlugFunction) (MPlug &srcPlug, MPlug &destPlug, bool made, void *clientData)
 Pointer to plug connection callback function. More...
 
typedef void(* MNodePlugFunction) (MObject &node, MPlug &plug, void *clientData)
 Pointer to a callback function which takes a dependency node and a plug. More...
 
typedef void(* MNodeStringFunction) (MObject &node, const MString &str, void *clientData)
 Pointer to a callback function which takes a dependency node and a string. More...
 
typedef void(* MParentChildFunction) (MDagPath &child, MDagPath &parent, void *clientData)
 Pointer to to a callback function which takes two DAG nodes in a parent/child relationship. More...
 
typedef void(* MModifierFunction) (MDGModifier &modifier, void *clientData)
 Pointer to a callback function which takes a DG modifier. More...
 
typedef void(* MStringArrayFunction) (const MStringArray &strs, void *clientData)
 Pointer to a callback function which takes a string array. More...
 
typedef void(* MNodeModifierFunction) (MObject &node, MDGModifier &modifier, void *clientData)
 Pointer to a callback function which takes a dependency node and a DG modifier. More...
 
typedef void(* MObjArray) (MObjectArray &objects, void *clientData)
 Pointer to a callback function which takes an array of objects. More...
 
typedef void(* MNodeObjArray) (MObject &node, MObjectArray &objects, void *clientData)
 Pointer to a callback function which takes a dependency node and an array of objects. More...
 
typedef void(* MStringNode) (const MString &str, MObject &node, void *clientData)
 Pointer to a callback function which takes a string and a dependency node. More...
 
typedef void(* MCameraLayerFunction) (MObject &cameraSetNode, unsigned int multiIndex, bool added, void *clientData)
 Pointer to a callback function which takes a dependency node, an unsigned integer, and a boolean value. More...
 
typedef void(* MCameraLayerCameraFunction) (MObject &cameraSetNode, unsigned int multiIndex, MObject &oldCamera, MObject &newCamera, void *clientData)
 Pointer to a callback function which takes a dependency node, an unsigned integer, and two camera transform nodes. More...
 
typedef void(* MConnFailFunction) (MPlug &srcPlug, MPlug &destPlug, const MString &srcPlugName, const MString &dstPlugName, void *clientData)
 Pointer to connection-failed callback function. More...
 
typedef void(* MPlugsDGModFunction) (MPlugArray &plugs, MDGModifier &modifier, void *clientData)
 Pointer to a callback function which takes an array of MPlugs and an MDGModifier. More...
 
typedef void(* MNodeUuidFunction) (MObject &node, const MUuid &uuid, void *clientData)
 Pointer to a callback function which takes a dependency node and a UUID. More...
 
typedef Action(* MCheckNodeUuidFunction) (bool doAction, MObject &node, MUuid &uuid, void *clientData)
 Pointer to a callback function which takes a dependency node and a UUID, and returns a result. More...
 
typedef void(* MObjectFileFunction) (const MObject &object, const MFileObject &file, void *clientData)
 Pointer to a callback function which takes an object and a file object. More...
 
typedef void(* MCheckObjectFileFunction) (bool *retCode, const MObject &referenceNode, MFileObject &file, void *clientData)
 Pointer to a callback function which takes an object and a file object and returns a result. More...
 
typedef void(* MRenderTileFunction) (int originX, int originY, int tileMaxX, int tileMaxY, const void *tileData)
 Pointer to a callback function which receives origin, size and image data. More...
 

Static Public Member Functions

static MCallbackId addParentAddedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a parent is added in the DAG. More...
 
static MCallbackId addParentAddedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a parent is added to the specified DAG node. More...
 
static MCallbackId addParentRemovedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a parent is removed in the DAG. More...
 
static MCallbackId addParentRemovedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a parent is removed from the specified DAG node. More...
 
static MCallbackId addChildAddedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child is added in the DAG. More...
 
static MCallbackId addChildAddedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child is added to the specified DAG node. More...
 
static MCallbackId addChildRemovedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child is removed in the DAG. More...
 
static MCallbackId addChildRemovedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child is removed from the specified DAG node. More...
 
static MCallbackId addChildReorderedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child is reordered in the DAG. More...
 
static MCallbackId addChildReorderedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a child of the specified DAG node is reordered. More...
 
static MCallbackId addDagCallback (DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called for specified DAG changes on all nodes. More...
 
static MCallbackId addDagDagPathCallback (MDagPath &node, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called for specified a DAG change is made to the specified DAG path. More...
 
static MCallbackId addAllDagChangesCallback (MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever any DAG change is made to any DAG node. More...
 
static MCallbackId addAllDagChangesDagPathCallback (MDagPath &node, MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever a DAG change is made to the specified DAG path. More...
 
static MCallbackId addInstanceAddedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever any node in the DAG is instanced. More...
 
static MCallbackId addInstanceAddedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever the specified node is instanced. More...
 
static MCallbackId addInstanceRemovedCallback (MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever an instance of any DAG node is removed or deleted. More...
 
static MCallbackId addInstanceRemovedDagPathCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called whenever an instance of the specified node is removed. More...
 
static MCallbackId addMatrixModifiedCallback (MDagPath &node, MDagMessage::MWorldMatrixModifiedFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called when the local matrix on the specified DAG node changes. More...
 
static MCallbackId addWorldMatrixModifiedCallback (MDagPath &node, MDagMessage::MWorldMatrixModifiedFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method registers a callback that is called when a parent matrix of the specified DAG node changes. More...
 
static const char * className ()
 Returns the name of this class. More...
 
static MCallbackId addParentAddedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addParentRemovedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addChildAddedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addChildRemovedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addChildReorderedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addInstanceAddedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addInstanceRemovedCallback (MDagPath &node, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addDagCallback (DagMessage msgType, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addDagCallback (MDagPath &node, DagMessage msgType, MMessage::MParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addDagCallback (MDagPath &node, DagMessage msgType, MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
static MCallbackId addAllDagChangesCallback (MDagPath &node, MDagMessage::MMessageParentChildFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL)
 This method is obsolete. More...
 
- Static Public Member Functions inherited from MMessage
static MStatus removeCallback (MCallbackId id)
 Remove the specified callback from maya. More...
 
static MStatus removeCallbacks (MCallbackIdArray &ids)
 Remove all of the specified callbacks from maya. More...
 
static MCallbackId currentCallbackId (MStatus *ReturnStatus=NULL)
 Return the callback ID of the currently executing callback. More...
 
static MStatus nodeCallbacks (MObject &node, MCallbackIdArray &ids)
 Returns a list of callback IDs associated registered to a given node. More...
 
static void setRegisteringCallableScript ()
 Mark this MMessage object as one that will be passed callbacks defined in script.
 
static bool registeringCallableScript ()
 Return true if this MMessage object has its callbacks defined in script.
 
static void stopRegisteringCallableScript ()
 Stop this MMessage object from being passed. More...
 
static const char * className ()
 Returns the name of this class. More...
 
static MStatus removeCallbacks (MIntArray &ids)
 This method is obsolete. More...
 
static MStatus nodeCallbacks (MObject &node, MIntArray &ids)
 This method is obsolete. More...
 

Detailed Description

DAG messages.

This class is used to register callbacks for DAG messages.

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

  • Parent Added
  • Parent Removed
  • Child Added
  • Child Removed
  • Child Reordered
  • Instance Added
  • Instance Removed

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.

NOTE: It is possible to get Parent Added and Child Added messages before the node name has been set. This can happen if the node is newly created. Additionally, the MDagPath string path names passed to the callback may not be set as yet if the node has not been added to the model. Accessing objects that are newly created or calling commands that access such objects from a callback may produce unknown results.

Member Typedef Documentation

typedef void(* MMessageParentChildFunction) (MDagMessage::DagMessage msgType, MDagPath &child, MDagPath &parent, void *clientData)

Pointer to a callback function which takes an MDagMessage, two MDagPaths and a clientData pointer.

Parameters
[in]msgTypeType of message which caused the function to be called.
[in,out]childFirst DAG path, usually used to pass the child of a parent/child pair.
[in,out]parentSecond DAG path, usually use to pass the parent of a parent/child pair.
[in,out]clientDataUser-defined data which was supplied when the callback was added.
typedef void(* MWorldMatrixModifiedFunction) (MObject &transformNode, MDagMessage::MatrixModifiedFlags &modified, void *clientData)

Pointer to world matrix modified callback function.

Parameters
[in]transformNodeThe node whose transformation has changed.
[in]modifiedThe flag which shows what has changed.
[in]clientDataPointer to user-defined data supplied when the callback was registered.

Member Enumeration Documentation

enum DagMessage

The type of DAG changed messages that have occurred.

Enumerator
kInvalidMsg 

an invalid message was used.

kParentAdded 

a parent was added to a DAG node

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 

a dummy value (used for looping through the message types)

Indicates which parts of a matrix have been modified.

Enumerator
kScaleX 

Scale in the X axis.

kScaleY 

Scale in the Y axis.

kScaleZ 

Scale in the Z axis.

kShearXY 

Shear in the XY plane.

kShearXZ 

Shear in the XZ plane.

kShearYZ 

Shear in the YZ plane.

kRotateX 

Rotate around the X axis.

kRotateY 

Rotate around the Y axis.

kRotateZ 

Rotate around the Z axis.

kTranslateX 

Translate along the X axis.

kTranslateY 

Translate along the Y axis.

kTranslateZ 

Translate along the Z axis.

kScalePivotX 

Scale pivot X position.

kScalePivotY 

Scale pivot Y position.

kScalePivotZ 

Scale pivot Z position.

kRotatePivotX 

Rotate pivot X position.

kRotatePivotY 

Rotate pivot Y position.

kRotatePivotZ 

Rotate pivot Z position.

kScaleTransX 

Scale pivot translation along X axis.

kScaleTransY 

Scale pivot translation along Y axis.

kScaleTransZ 

Scale pivot translation along Z axis.

kRotateTransX 

Rotate pivot translation along X axis.

kRotateTransY 

Rotate pivot translation along Y axis.

kRotateTransZ 

Rotate pivot translation along Z axis.

kRotateOrientX 

Rotation orientation around the X axis.

kRotateOrientY 

Rotation orientation around the Y axis.

kRotateOrientZ 

Rotation orientation around the Z axis.

kRotateOrder 

Rotation order.

kAll 

All.

kScale 

Scale in all axis.

kShear 

Shear in all axis.

kRotation 

Rotation around all axis.

kTranslation 

Translation along all axis.

kScalePivot 

Scale pivot in all axis.

kRotatePivot 

Rotate pivot in all axis.

kScalePivotTrans 

Scale pivot translation for all axis.

kRotatePivotTrans 

Rotate pivot translation for all axis.

kRotateOrient 

Rotation orientation around all axis.

Member Function Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN MCallbackId addParentAddedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Please see the note in the Description section about this callback.

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addParentAddedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Please see the note in the Description section about this callback.

Parameters
[in]nodeThe DAG node to register the callback for
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
Examples:
gpuCache/gpuCacheSubSceneOverride.cpp.
MCallbackId addParentRemovedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addParentRemovedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
Examples:
gpuCache/gpuCacheSubSceneOverride.cpp.
MCallbackId addChildAddedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Please see the note in the Description section about this callback.

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildAddedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Please see the note in the Description section about this callback.

Parameters
[in]nodeThe DAG node to register the callback for
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildRemovedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildRemovedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildReorderedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildReorderedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addDagCallback ( DagMessage  msgType,
MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method registers a callback that is called for specified DAG changes on all nodes.

The callback will also receive the DagMessage.

Please see the note in the Description section about this callback if Parent Added or Child Added messages are being used.

Parameters
[in]msgTypeThe type of DAG change to trigger the callback
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
Examples:
dagMessageCmd/dagMessageCmd.cpp.
MCallbackId addDagDagPathCallback ( MDagPath node,
DagMessage  msgType,
MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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.

Please see the note in the Description section about this callback if Parent Added or Child Added messages are being used.

Parameters
[in]nodeThe DAG node to register the callback for.
[in]msgTypeThe type of DAG change to trigger the callback.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
Examples:
dagMessageCmd/dagMessageCmd.cpp, and instanceCallbackCmd/instanceCallbackCmd.cpp.
MCallbackId addAllDagChangesCallback ( MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Please see the note in the Description section about this callback if Parent Added or Child Added messages are being used.

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
Examples:
dagMessageCmd/dagMessageCmd.cpp, and transformDrawNode/transformDrawNode.cpp.
MCallbackId addAllDagChangesDagPathCallback ( MDagPath node,
MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
Examples:
dagMessageCmd/dagMessageCmd.cpp.
MCallbackId addInstanceAddedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addInstanceAddedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
Examples:
footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, geometryOverrideExample1/geometryOverrideExample1.cpp, geometryOverrideExample2/geometryOverrideExample2.cpp, and gpuCache/gpuCacheSubSceneOverride.cpp.
MCallbackId addInstanceRemovedCallback ( MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addInstanceRemovedDagPathCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
Examples:
footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, and gpuCache/gpuCacheSubSceneOverride.cpp.
MCallbackId addMatrixModifiedCallback ( MDagPath affectedNode,
MDagMessage::MWorldMatrixModifiedFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method registers a callback that is called when the local matrix on the specified DAG node changes.

If the node's transformation is already dirty (i.e. it has not been evaluated since it was last changed) then the callback will not be triggered. So if the node's transformation is modified multiple times between evaluations, only the first one will result in the callback being called.

Parameters
[in]affectedNodeThe DAG node to register the callback for.
[in]funcThe callback function.
  • triggerNode The node whose transformation changed
  • flag How the trigger node's transformation changed
  • clientData User defined data passed to the callback function.
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addWorldMatrixModifiedCallback ( MDagPath affectedNode,
MDagMessage::MWorldMatrixModifiedFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method registers a callback that is called when a parent matrix of the specified DAG node changes.

Since a node's worldMatrix is affected by the transforms of its ancestors in the DAG, it's possible for there to be two different nodes involved: the "trigger" node, whose transform has changed, and the "affected" node, whose worldMatrix is affected by the change to the trigger.

The callback is placed on the affected node, but it is the trigger node which is passed to the callback.

If the trigger node's transformation is already dirty (i.e. it has not been evaluated since it was last changed) then the callback will not be triggered. So if the trigger node's transformation is modified multiple times between evaluations, only the first one will result in the callback being called.

Parameters
[in]affectedNodeThe DAG node to register the callback for.
[in]funcThe callback function.
  • triggerNode The node whose transformation changed
  • flag How the trigger node's transformation changed
  • clientData User defined data passed to the callback function.
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
Examples:
gpuCache/gpuCacheSubSceneOverride.cpp, and transformDrawNode/transformDrawNode.cpp.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.
MCallbackId addParentAddedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addParentAddedDagPathCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addParentRemovedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addParentRemovedDagPathCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addChildAddedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addChildAddedDagPathCallback instead.

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

Please see the note in the Description section about this callback.

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addChildRemovedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addChildRemovedDagPathCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addChildReorderedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addChildReorderedDagPathCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addInstanceAddedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addDagCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addInstanceRemovedCallback ( MDagPath node,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addDagCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addDagCallback ( DagMessage  msgType,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[from before Maya 2015]

Deprecated:
Use MDagMessage::addDagCallback instead.

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

Please see the note in the Description section about this callback if Parent Added or Child Added messages are being used.

Parameters
[in]msgTypeThe type of DAG change to trigger the callback
[in]functhe 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
Parameters
[in]clientDataUser defined data passed to the callback function
[out]ReturnStatusstatus code
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback
MCallbackId addDagCallback ( MDagPath node,
DagMessage  msgType,
MMessage::MParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[from before Maya 2015]

Deprecated:
Use MDagMessage::addDagDagPathCallback instead.

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

Please see the note in the Description section about this callback if Parent Added or Child Added messages are being used.

Parameters
[in]nodeThe DAG node to register the callback for.
[in]msgTypeThe type of DAG change to trigger the callback.
[in]funcThe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.
MCallbackId addDagCallback ( MDagPath node,
DagMessage  msgType,
MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addDagDagPathCallback instead.
MCallbackId addAllDagChangesCallback ( MDagPath node,
MDagMessage::MMessageParentChildFunction  func,
void *  clientData = NULL,
MStatus ReturnStatus = NULL 
)
static

This method is obsolete.

This method is not available in Python.

[as of Maya 2019]

Deprecated:
Use MDagMessage::addAllDagChangesDagPathCallback instead.

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

Parameters
[in]nodeThe DAG node to register the callback for.
[in]functhe 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.
Parameters
[in]clientDataUser defined data passed to the callback function.
[out]ReturnStatusStatus code.
Returns
Identifier used for removing the callback.
Status Codes:
  • MS::kSuccess Operation succeeded.
  • MS::kInsufficientMemory No memory available.
  • MS::kFailure Error adding callback.

The documentation for this class was generated from the following files: