- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# MAnimCurveChange Class Reference
OpenMayaAnim - API module for animation

Search for all occurrences

## Detailed Description

Anim Curve Change Cache.

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.

`#include <MAnimCurveChange.h>`

List of all members.

## Public Member Functions
| MAnimCurveChange (MStatus *ReturnStatus=NULL)
| Class Constructor.
| ~MAnimCurveChange ()
| Class Destructor.
MStatus | undoIt ()
| Undoes all of the Anim Curve edits that have been given to this cache.
MStatus | redoIt ()
| Redoes all of the Anim Curve edits that this cache previously undid.
bool | isInteractive () const
| Return the performance hint flag value.
void | setInteractive (bool value)
| The interactive flag is a performance hint.
## Static Public Member Functions
static const char * | className ()
| Returns the name of this class.

## Constructor & Destructor Documentation

MAnimCurveChange | ( | MStatus * | ReturnStatus = `NULL` | ) |

Class Constructor.

Creates a Anim Curve Change cache.

Parameters:

  [out] | ReturnStatus | Status Code (see below)

Status Codes:
  - MS::kSuccess Success
  - MS::kInsufficientMemory Insufficient memory to create Anim Curve Change cache

~MAnimCurveChange | ( |  | ) |

Class Destructor.

No additional action.

## Member Function Documentation

MStatus undoIt | ( |  | ) |

Search for all occurrences

Undoes all of the Anim Curve edits that have been given to this cache.

Returns:
  Status Code (see below)

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure undoing edits - cache nonexistent or inaccessible

MStatus redoIt | ( |  | ) |

Search for all occurrences

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.

Returns:
  Status Code (see below)

Status Codes:
  - MS::kSuccess Success
  - MS::kFailure Failure redoing edits - cache nonexistent or inaccessible

bool isInteractive | ( |  | ) | const

Search for all occurrences

Return the performance hint flag value.

Returns:
  returns true if the interactive flag is set.

void setInteractive | ( | bool | value | ) |

Search for all occurrences

The interactive flag is a performance hint.

If the flag is set to true new edits will be merged with the key from previous edit. For example if you are dragging the key each drag will be merged so only the last edit of the drag is safed. If the curves have a lot of scattered edit this merge will not scale well, so it is best to to it to false in this case.

Parameters:

  [in] | value | the value to set the flag.

const char * className | ( |  | ) | `[static]`

Search for all occurrences

Returns the name of this class.

Returns:
  The name of this class.

MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange
MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange MAnimCurveChange