#include <MGraphEditorInfo.h>
Graph Editor state information with manipulation capabilities.
This class provides methods to obtain UI related information from a specific Graph Editor. Support is included for obtaining/setting viewport bounds and obtaining animation curve nodes.
Note: the following are built-in GraphEditor-specific event callback names:
Python 1.0 Example: (getting the names of the curves selected in the default Graph Editor)
Python 1.0 Example: (getting the default Graph Editor's viewport bounds when it encounters a refresh event)
Python 1.0 Example: (setting the default Graph Editor's viewport bounds)
Public Types | |
enum | AnimCurveQuery { kAnimCurveOutlinerOnly = 0, kAnimCurveHighlighted, kAnimCurveSelected, kAnimCurveAllKnown } |
Defines the query criteria for animation curves specifically with respect to the attached Graph Editor's own viewport. More... | |
Public Member Functions | |
MGraphEditorInfo (MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MGraphEditorInfo (const MString &graphEditorName, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
virtual | ~MGraphEditorInfo () |
Destructor. | |
MStatus | getViewportBounds (double &left, double &right, double &bottom, double &top) const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units. More... | |
MStatus | getViewportBounds (MDoubleArray &boundsArray) const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units. More... | |
MStatus | setViewportBounds (double left, double right, double bottom, double top) const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport. More... | |
MStatus | setViewportBounds (const MDoubleArray &boundsArray) const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport. More... | |
MStatus | getAnimCurveNodes (MObjectArray &animCurveNodeArray, AnimCurveQuery animCurveQuery) const |
Returns an array of animCurve nodes, based on the attached Graph Editor's state information, which captures: More... | |
void | reset () |
Resets all stored state information to be empty, thereby detaching from the currently attached Graph Editor (if any) | |
MString | name () const |
Returns the name of the currently attached Graph Editor (if any) More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
enum AnimCurveQuery |
Defines the query criteria for animation curves specifically with respect to the attached Graph Editor's own viewport.
MGraphEditorInfo | ( | MStatus * | ReturnStatus = NULL | ) |
Constructor.
Attaches to the default Graph Editor object - graphEditor1GraphEd
[out] | ReturnStatus | the return status |
MGraphEditorInfo | ( | const MString & | graphEditorName, |
MStatus * | ReturnStatus = NULL |
||
) |
Constructor.
Attaches to the Graph Editor corresponding the supplied name.
[in] | graphEditorName | the name of the Graph Editor (i.e. graphEditor1GraphEd) |
[out] | ReturnStatus | the return status |
MStatus getViewportBounds | ( | double & | left, |
double & | right, | ||
double & | bottom, | ||
double & | top | ||
) | const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[out] | left | left co-ordinate |
[out] | right | right co-ordinate |
[out] | bottom | bottom co-ordinate |
[out] | top | top co-ordinate |
MStatus getViewportBounds | ( | MDoubleArray & | boundsArray | ) | const |
Get the attached Graph Editor's viewport bounds, using the currently defined animation time units.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[out] | boundsArray | an array of four doubles representing in order: (left, right, bottom, top) bounds co-ordinates |
MStatus setViewportBounds | ( | double | left, |
double | right, | ||
double | bottom, | ||
double | top | ||
) | const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[in] | left | left co-ordinate |
[in] | right | right co-ordinate |
[in] | bottom | bottom co-ordinate |
[in] | top | top co-ordinate |
MStatus setViewportBounds | ( | const MDoubleArray & | boundsArray | ) | const |
Set the attached Graph Editor's viewport bounds to those that are supplied using the currently defined animation time units as seen in the viewport.
Note: a viewport that is displaying stacked curves or re-normalized curves is not currently supported.
[in] | boundsArray | an array of exactly four doubles representing in order: (left, right, bottom, top) bounds co-ordinates |
MStatus getAnimCurveNodes | ( | MObjectArray & | animCurveNodeArray, |
AnimCurveQuery | animCurveQuery | ||
) | const |
Returns an array of animCurve nodes, based on the attached Graph Editor's state information, which captures:
1) animCurve nodes present in the Outliner, but not visible in the viewport 2) animCurve nodes highlighted in the Outliner and visible in the viewport 3) animCurve nodes selected (via keys/tangent handles) in the viewport 4) animCurve nodes known to exist (independent of any Outliner filtering)
[out] | animCurveNodeArray | an array to store the found anim curves |
[in] | animCurveQuery | the anim curves to enumerate (by display state) |
MString name | ( | ) | const |
Returns the name of the currently attached Graph Editor (if any)
|
static |
Returns the name of this class.