#include
<MAnimCurveChange.h>
Adding, removing and changing keyframes on an anim curve cannot be done simply by setting attribute values on the corresponding node. This makes it impossible to capture such changes in an MDGModifier for undo/redo purposes.
The MAnimCurveChange class provides persistent storage for information concerning changes to anim curve nodes, along with methods to undo and redo those changes. MFnAnimCurve methods which add, remove or change keyframes take an optional MAnimCurveChange instance in which to store information about the changes being made.
If the same MAnimCurveChange instance is used for multiple anim curve edit operations, then the cache maintains an undo/redo queue which allows all changes in the series to be undone or redone. If selective undo/redo is required, then a different MAnimCurveCache instance must be used for each edit.
Public Member Functions |
|
MAnimCurveChange (MStatus *ReturnStatus=NULL) | |
~MAnimCurveChange () | |
MStatus | undoIt () |
MStatus | redoIt () |
MAnimCurveChange::MAnimCurveChange | ( | MStatus * | ReturnStatus =
NULL |
) |
Class Constructor
Creates a Anim Curve Change cache.
[out] | ReturnStatus | Status Code (see below) |
MAnimCurveChange::~MAnimCurveChange | ( | ) |
Class Destructor
No additional action.
MStatus MAnimCurveChange::undoIt | ( | ) |
Undoes all of the Anim Curve edits that have been given to this cache.
MStatus MAnimCurveChange::redoIt | ( | ) |
Redoes all of the Anim Curve edits that this cache previously undid. It is only valid to invoke this method after an undo on this cache.
Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |