class MAnimCurveChange

Jump to documentation

Anim Curve Change Cache (OpenMayaAnim) (OpenMayaAnim.py)

public members:

MAnimCurveChange ( MStatus * ReturnStatus = NULL )
~MAnimCurveChange ()
MStatus undoIt ()
MStatus redoIt ()

Documentation

Create Anim Curve change caches.

Undo Anim Curve changes which have been cached.

Redo Anim Curve changes which were previously undone.

Description

Caching of the undo and redo information in a Anim Curve Change cache is required primarily to support interactive editing of Anim Curves in the UI.

Anim Curve Change caches are used as persistent storage for information concerning changes to Anim Curve Nodes.

When invoked with a valid Anim Curve change parameter, the remove keyframe and add keyframe methods of the Anim Curve Function Set (MFnAnimCurve::remove() and MFnAnimCurve::addKeyframe(), respectively) cache the change information in the Anim Curve Change cache so that the caller can undo and redo the changes as required.

If the same cache is used for a series of 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 Anim Curve Change cache is required for each edit.

Use Anim Curve Change caches in conjunction with the Anim Curve Function Set (MFnAnimCurve) to perform undoable and redoable edits on Anim Curves.

Functions

MAnimCurveChange:: MAnimCurveChange ( MStatus * ReturnStatus )

Description

Class Constructor

Creates a Anim Curve Change cache.

Arguments

  • ReturnStatus Status Code (see below)

Status Codes

  • MS::kSuccess Success
  • MS::kInsufficientMemory Insufficient memory to create Anim Curve Change cache

MAnimCurveChange:: ~MAnimCurveChange ()

Description

Class Destructor

No additional action.

MStatus MAnimCurveChange:: undoIt ()

Description

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

Return Value

  • Status Code (see below)

Status Codes

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

MStatus MAnimCurveChange:: redoIt ()

Description

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.

Return Value

  • Status Code (see below)

Status Codes

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

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright