Python API 2.0 Reference
|
Static Public Member Functions | |
def | addAnimCurveEditedCallback () |
def | addAnimKeyframeEditCheckCallback () |
def | addAnimKeyframeEditedCallback () |
def | addDisableImplicitControlCallback () |
def | addNodeAnimKeyframeEditedCallback () |
def | addPostBakeResultsCallback () |
def | addPreBakeResultsCallback () |
def | flushAnimKeyframeEditedCallbacks () |
Additional Inherited Members |
Class used to register callbacks for anim related messages. Method resolution order: - MAnimMessage - OpenMaya.MMessage - builtins.object
|
static |
addAnimCurveEditedCallback(function, clientData=None) -> id This method registers a callback that is called whenever an AnimCurve is edited. * function - callable which will be passed a MObjectArray object containing an array of AnimCurves which have been edited, and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addAnimKeyframeEditCheckCallback(function, clientData=None) -> id This method registers a callback that is used by the setKeyframe command to allow a user to consider the set keyframe request and cancel it if needed. The callback method should return False to abort the keyframe setting. * function - callable which will be passed a MPlug indicating the plug being keyframed and the clientData object. Return False to abort the keyframe action, otherwise return True * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addAnimKeyframeEditedCallback(function, clientData=None) -> id This method registers a callback that is called whenever an a group of keys are modified. The callback is invoked once per atomic change to single or group of keyframes. For example, if a user selects a group 5 of keys and moves them 5 units in the value axis, then a single callback event will be invoked with a MObject for each of the 5 keyframes. The MObjects can then be used in the MFnKeyframeDelta function set. Refer to MFnKeyframeDelta function set documentation for more info. * function - callable which will be passed a MObjectArray object containing an array of keyframes that were edited, and the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addDisableImplicitControlCallback(function, clientData=None) -> id This method registers a callback that is called from bakeResults command after baking operation is completed, if disableImplicitControl is enabled. One example usage of this callback is to create the anim curve that is used to drive Maya rigidbody's bakeSimulationIndex, which defines if the rigid body should take its input from anim curve or rigid body simulation. * function - callable which will be passed a MPlugArray containing the baked plugs (they can be replaced but must have the same number of plugs), a MDGModifier used if bakeResults command is undone or redone and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addNodeAnimKeyframeEditedCallback(animNode, function, clientData=None) -> id This method registers a callback that is called whenever an a group of keys are modified. The callback is invoked once per atomic change to single or group of keyframes on the specified animation curve node. For example, if a user selects a group 5 of keys and moves them 5 units in the value axis, then a single callback event will be invoked with a MObject for each of the 5 keyframes. The MObjects can then be used in the MFnKeyframeDelta function set. Refer to MFnKeyframeDelta function set documentation for more info. * animNode (MObject) - the param curve node you want to watch. * function - callable which will be passed a MObject indicating the edited animation node, a MObjectArray containing an array of keyframes that were edited and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addPostBakeResultsCallback(function, clientData=None) -> id This method registers a callback that is called from bakeResults command after the simulation. If the plugArray is replaced, then the anim curves created from baking will be connected to the new plugs. * function - callable which will be passed a MPlugArray containing the baked plugs to which the resulting anim curves will be connected (they can be replaced but must have the same number of plugs),a MDGModifier used if bakeResults command is undone or redone and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
addPreBakeResultsCallback(function, clientData=None) -> id This method registers a callback that is called from bakeResults command before the simulation. One example usage is handle the runup to the first frame in a dynamic system. If plugArray is set to zero length in the callback, the baking will be aborted. * function - callable which will be passed a MPlugArray containing the plugs to be baked (they can be replaced but must have the same number of plugs) ,a MDGModifier used if bakeResults command is undone or redone and the clientData object. * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
flushAnimKeyframeEditedCallbacks() -> None Animation keyframe edited callbacks are queued to only be issued on an idle event. There may be times when it is desired to issue the callback at a specific time. This method provides this functionality. It will flush all animation keyframe edited callbacks and force them to issue their callbacks with the data contained within.