Python API 2.0 Reference
|
Static Public Member Functions | |
def | addAllDagChangesCallback () |
def | addAllDagChangesDagPathCallback () |
def | addChildAddedCallback () |
def | addChildAddedDagPathCallback () |
def | addChildRemovedCallback () |
def | addChildRemovedDagPathCallback () |
def | addChildReorderedCallback () |
def | addChildReorderedDagPathCallback () |
def | addDagCallback () |
def | addDagDagPathCallback () |
def | addInstanceAddedCallback () |
def | addInstanceAddedDagPathCallback () |
def | addInstanceRemovedCallback () |
def | addInstanceRemovedDagPathCallback () |
def | addMatrixModifiedCallback () |
def | addParentAddedCallback () |
def | addParentAddedDagPathCallback () |
def | addParentRemovedCallback () |
def | addParentRemovedDagPathCallback () |
def | addWorldMatrixModifiedCallback () |
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 - builtins.object
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
static |
addMatrixModifiedCallback(node, function, clientData=None) -> id 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. * 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.
|
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.
|
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.
|
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.
|
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.
|
static |
addWorldMatrixModifiedCallback(node, function, clientData=None) -> id 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. * 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.