OpenMaya.MDagMessage Class Reference
Class used to register callbacks for Dag related messages.
The class also provides the following DagMessage constants which describe the different types of DAG operations:
kParentAdded
kParentRemoved
kChildAdded
kChildRemoved
kChildReordered
kInstanceAdded
kInstanceRemoved
kInvalidMsg
Method resolution order:
- MDagMessage
- MMessage
- __builtin__.object
|
int | kAll = 268435455 |
|
int | kChildAdded = 2 |
|
int | kChildRemoved = 3 |
|
int | kChildReordered = 4 |
|
int | kInstanceAdded = 5 |
|
int | kInstanceRemoved = 6 |
|
int | kInvalidMsg = -1 |
|
int | kLast = 7 |
|
int | kParentAdded = 0 |
|
int | kParentRemoved = 1 |
|
int | kRotateOrder = 134217728 |
|
int | kRotateOrient = 117440512 |
|
int | kRotateOrientX = 16777216 |
|
int | kRotateOrientY = 33554432 |
|
int | kRotateOrientZ = 67108864 |
|
int | kRotatePivot = 229376 |
|
int | kRotatePivotTrans = 14680064 |
|
int | kRotatePivotX = 32768 |
|
int | kRotatePivotY = 65536 |
|
int | kRotatePivotZ = 131072 |
|
int | kRotateTransX = 2097152 |
|
int | kRotateTransY = 4194304 |
|
int | kRotateTransZ = 8388608 |
|
int | kRotateX = 64 |
|
int | kRotateY = 128 |
|
int | kRotateZ = 256 |
|
int | kRotation = 448 |
|
int | kScale = 7 |
|
int | kScalePivot = 28672 |
|
int | kScalePivotTrans = 1835008 |
|
int | kScalePivotX = 4096 |
|
int | kScalePivotY = 8192 |
|
int | kScalePivotZ = 16384 |
|
int | kScaleTransX = 262144 |
|
int | kScaleTransY = 524288 |
|
int | kScaleTransZ = 1048576 |
|
int | kScaleX = 1 |
|
int | kScaleY = 2 |
|
int | kScaleZ = 4 |
|
int | kShear = 56 |
|
int | kShearXY = 8 |
|
int | kShearXZ = 16 |
|
int | kShearYZ = 32 |
|
int | kTranslateX = 512 |
|
int | kTranslateY = 1024 |
|
int | kTranslateZ = 2048 |
|
int | kTranslation = 3584 |
|
int | kDefaultAction = 0 |
|
int | kDoAction = 2 |
|
int | kDoNotDoAction = 1 |
|
OpenMaya.MDagMessage.addAllDagChangesCallback |
( |
| ) |
|
|
static |
addAllDagChangesCallback(function, clientData=None) -> id
This method registers a callback that is called whenever any
DAG change is made to any DAG node.
* function - callable which will be passed a DagMessage constant
indicating the operation which triggered the callback (see class
docs for a list), a MDagPath to the parent, a MDagPath to the child
,and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addAllDagChangesDagPathCallback |
( |
| ) |
|
|
static |
addAllDagChangesDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a DAG
change is made to the specified DAG path.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a DagMessage constant
indicating the operation which triggered the callback (see class
docs for a list), a MDagPath to the parent, a MDagPath to the child
,and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildAddedCallback |
( |
| ) |
|
|
static |
addChildAddedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever a child is
added in the DAG.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildAddedDagPathCallback |
( |
| ) |
|
|
static |
addChildAddedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a child is
added to the specified DAG node.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildRemovedCallback |
( |
| ) |
|
|
static |
addChildRemovedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever a child is
removed in the DAG.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildRemovedDagPathCallback |
( |
| ) |
|
|
static |
addChildRemovedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a child is
removed from the specified DAG node.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildReorderedCallback |
( |
| ) |
|
|
static |
addChildReorderedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever a child is
reordered in the DAG.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addChildReorderedDagPathCallback |
( |
| ) |
|
|
static |
addChildReorderedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a child of
the specified DAG node is reordered
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addDagCallback |
( |
| ) |
|
|
static |
addDagCallback(msgType, function, clientData=None) -> id
This method registers a callback that is called for specified
DAG changes on all nodes. The callback will also receive the
DagMessage
* msgType (DagMessage) - The type of DAG change to trigger the callback
* function - callable which will be passed a DagMessage constant
indicating the operation which triggered the callback (see class
docs for a list), a MDagPath to the parent, a MDagPath to the child
,and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addDagDagPathCallback |
( |
| ) |
|
|
static |
addDagDagPathCallback(node, msgType, function, clientData=None) -> id
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.
* node (MDagPath) - the DAG node to register the callback for
* msgType (DagMessage) - The type of DAG change to trigger the callback
(see class docs for a list)
* function - callable which will be passed a DagMessage constant
indicating the operation which triggered the callback, a MDagPath
to the parent, a MDagPath to the child
,and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addInstanceAddedCallback |
( |
| ) |
|
|
static |
addInstanceAddedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever any node in the DAG
is instanced.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addInstanceAddedDagPathCallback |
( |
| ) |
|
|
static |
addInstanceAddedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever the specified node
is instanced
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addInstanceRemovedCallback |
( |
| ) |
|
|
static |
addInstanceRemovedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever an instance of any DAG
node is removed or deleted.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addInstanceRemovedDagPathCallback |
( |
| ) |
|
|
static |
addInstanceRemovedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever an instance of the specified
node is removed.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addParentAddedCallback |
( |
| ) |
|
|
static |
addParentAddedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever a parent is
added in the DAG.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addParentAddedDagPathCallback |
( |
| ) |
|
|
static |
addParentAddedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a parent is
added to the specified DAG node.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addParentRemovedCallback |
( |
| ) |
|
|
static |
addParentRemovedCallback(function, clientData=None) -> id
This method registers a callback that is called whenever a parent is
removed in the DAG.
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addParentRemovedDagPathCallback |
( |
| ) |
|
|
static |
addParentRemovedDagPathCallback(node, function, clientData=None) -> id
This method registers a callback that is called whenever a parent is
removed from the specified DAG node.
* node (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MDagPath to the parent,
a MDagPath to the child, and the clientData object
* clientData - User defined data passed to the callback function
* return: Identifier used for removing the callback.
OpenMaya.MDagMessage.addWorldMatrixModifiedCallback |
( |
| ) |
|
|
static |
addWorldMatrixModifiedCallback(node, function, clientData=None) -> id
This method registers a callback that is called when a DAG node's worldMatrix
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 trigger node may be the same as the affected node, or it may be one of
its ancestors.
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.
* affectedNode (MDagPath) - the DAG node to register the callback for
* function - callable which will be passed a MObject indicating the node
whose transformation has changed, a MatrixModifiedFlags constant showing
what has changed (see below for complete list) and the clientData object
* clientData - User defined data passed to the callback function
Available MatrixModifiedFlags constants:
Individual flags:
kScaleX kScaleY kScaleZ
kShearXY kShearXZ kShearYZ
kRotateX kRotateY kRotateZ
kTranslateX kTranslateY kTranslateZ
kScalePivotX kScalePivotY kScalePivotZ
kRotatePivotX kRotatePivotY kRotatePivotZ
kScaleTransX kScaleTransY kScaleTransZ
kRotateTransX kRotateTransY kRotateTransZ
kRotateOrientX kRotateOrientY kRotateOrientZ
kRotateOrder
Composite flags
kAll
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
* return: Identifier used for removing the callback.