class MAnimMessage

Jump to documentation

: public MMessage Animation messages (OpenMayaAnim) (OpenMayaAnim.py)

Inheritance:

MAnimMessage < MMessage

public members:

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 addAnimKeyframeEditedCallback ( MObject &animNode, MMessage::MNodeObjArray func, void *clientData = NULL, MStatus * ReturnStatus = NULL )
AnimCurve keyframe edited callback.
static void flushAnimKeyframeEditedCallbacks ()
AnimCurve keyframe edited callback flush.

Inherited from MMessage:

public members:

static MStatus removeCallback ( MCallbackId id )
static MStatus removeCallbacks ( MCallbackIdArray &ids )
static MCallbackId currentCallbackId ( MStatus * ReturnStatus = NULL )
static MStatus nodeCallbacks ( MObject & node, MCallbackIdArray & ids )
static void setRegisteringCallableScript ()
static bool registeringCallableScript ()
static MStatus removeCallbacks ( MIntArray &ids )
static MStatus nodeCallbacks ( MObject & node, MIntArray & ids )

Documentation

Animation messages (OpenMayaAnim) (OpenMayaAnim.py)
Description

This class is used to register callbacks for animation messages.

There are 3 add callback methods which will add callbacks for the following message

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.

Functions

MCallbackId MAnimMessage:: addAnimCurveEditedCallback ( MMessage::MObjArray func, void * clientData , MStatus * ReturnStatus )

Description

This method registers a callback that is called whenever an AnimCurve is edited.

Arguments

  • func the callback function
    • editedCurves an array of AnimCurves which have been edited
    • clientData User defined data passed to the callback function
  • clientData User defined data passed to the callback function
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MAnimMessage:: addAnimKeyframeEditedCallback ( MMessage::MObjArray func, void * clientData , MStatus * ReturnStatus )

Description

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.

Arguments

  • func the callback function
    • editedKeys an array of keyframes that were edited.
    • clientData User defined data passed to the callback function
  • clientData User defined data.
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

MCallbackId MAnimMessage:: addAnimKeyframeEditedCallback ( MObject &animNode, MMessage::MNodeObjArray func, void *clientData , MStatus * ReturnStatus )
Description

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.

Arguments

  • animNode the param curve node you want to watch.
  • func the callback function
    • animNode The edited animation node.
    • editedKeys an array of keyframes that were edited.
    • clientData User defined data passed to the callback function
  • clientData User defined data.
  • ReturnStatus status code

Return Value

  • identifier used for removing the callback.

Status Codes

  • MS::kSuccess Operation succeeded
  • MS::kInsufficientMemory No memory available
  • MS::kFailure Error adding callback

void MAnimMessage:: flushAnimKeyframeEditedCallbacks ()
Description

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.

Return Value

  • void

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright