#include <MAnimMessage.h>
This class is used to register callbacks for animation messages.
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.
Static Public Member Functions | |
static MCallbackId | addAnimCurveEditedCallback (MMessage::MObjArray func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
AnimCurve edited callback. | |
static MCallbackId | addAnimKeyframeEditedCallback (MMessage::MObjArray func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
AnimCurve keyframe edited callback. | |
static MCallbackId | addNodeAnimKeyframeEditedCallback (MObject &animNode, MMessage::MNodeObjArray func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
AnimCurve keyframe edited callback. | |
static MCallbackId | addAnimKeyframeEditCheckCallback (MMessage::MCheckPlugFunction func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
AnimCurve keyframe edit check callback. | |
static MCallbackId | addAnimKeyframeEditedCallback (MObject &animNode, MMessage::MNodeObjArray func, void *clientData=NULL, MStatus *ReturnStatus=NULL) |
This method is obsolete. This method is not available in Python. | |
static void | flushAnimKeyframeEditedCallbacks () |
AnimCurve keyframe edited callback flush. |
MCallbackId MAnimMessage::addAnimCurveEditedCallback | ( | MMessage::MObjArray | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
AnimCurve edited callback.
This method registers a callback that is called whenever an AnimCurve is edited.
[in] | func | the callback function |
[in] | clientData | User defined data passed to the callback function |
[in] | ReturnStatus | status code |
MCallbackId MAnimMessage::addAnimKeyframeEditedCallback | ( | MMessage::MObjArray | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
AnimCurve keyframe edited callback.
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.
[in] | func | the callback function |
[in] | clientData | User defined data. |
[out] | ReturnStatus | status code |
MCallbackId MAnimMessage::addNodeAnimKeyframeEditedCallback | ( | MObject & | animNode, | |
MMessage::MNodeObjArray | func, | |||
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
AnimCurve keyframe edited callback.
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.
[in] | animNode | the param curve node you want to watch. |
[in] | func | the callback function |
[in] | clientData | User defined data. |
[out] | ReturnStatus | status code |
MCallbackId MAnimMessage::addAnimKeyframeEditCheckCallback | ( | MMessage::MCheckPlugFunction | func, | |
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
AnimCurve keyframe edit check callback.
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.
[in] | func | the callback function
|
[in] | clientData | User defined data. |
[out] | ReturnStatus | status code |
MAnimMessage m; m.addAnimKeyframeEditCheckCallback( check_callback ); void check_callback(bool *retcode, MPlug& plug, void* clientData ) { // Don't allow any keys to be set on attributes with 'translate' in them *retcode = ( plug.name().indexW( "translate" ) == -1 ); }
MCallbackId MAnimMessage::addAnimKeyframeEditedCallback | ( | MObject & | animNode, | |
MMessage::MNodeObjArray | func, | |||
void * | clientData = NULL , |
|||
MStatus * | ReturnStatus = NULL | |||
) | [static] |
This method is obsolete. This method is not available in Python.
void MAnimMessage::flushAnimKeyframeEditedCallbacks | ( | ) | [static] |
AnimCurve keyframe edited callback flush.
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.
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |