#include <MAnimControl.h>
This class provide access to the values that control how an animation is played. This includes the minimum and maximum frames included in the playback, whether the playback loops, and whether the animation runs in all views, or only the active view, etc.
Methods also exist that mirror the functionality of the controls found on the time slider in the UI to start and stop the playback.
MAnimControl::MAnimControl | ( | ) |
Class constructor.
MAnimControl::~MAnimControl | ( | ) | [virtual] |
Class destructor
MAnimControl::PlaybackMode MAnimControl::playbackMode | ( | ) | [static] |
Return the playback mode currently in effect.
MStatus MAnimControl::setPlaybackMode | ( | PlaybackMode | newMode | ) | [static] |
Set the current playback mode.
[in] | newMode | an element of MAnimControl::PlaybackMode |
MAnimControl::PlaybackViewMode MAnimControl::viewMode | ( | ) | [static] |
Return the viewing mode currently in effect.
MStatus MAnimControl::setViewMode | ( | PlaybackViewMode | newMode | ) | [static] |
Set the current viewing mode. Controls whether the animation is run in only the active view, or simultaneously in all views.
[in] | newMode | an element of MAnimControl::PlaybackViewMode |
double MAnimControl::playbackBy | ( | ) | [static] |
Return a double specifying the increment between times viewed during the playing of the animation.
MStatus MAnimControl::setPlaybackBy | ( | const double & | newTime | ) | [static] |
Specify the increment between times viewed during the playing of the animation.
[in] | newTime | a double containing the new increment |
MTime MAnimControl::minTime | ( | ) | [static] |
Return an MTime specifying the first frame of the current playback time range. This corresponds to the minTime which can also be set and queried using the playbackOptions mel command. It does not represent the first frame of the total animation time unless the two coincide.
MTime MAnimControl::maxTime | ( | ) | [static] |
Return an MTime specifying the last frame of the current playback time range. This corresponds to the maxTime which can also be set and queried using the playbackOptions mel command. It does not represent the final frame of the total animation time unless the two coincide.
Set the first frame of the current playback time range.
[in] | newMinTime | an MTime containing the frame |
Set the value of the last frame of the current playback time range.
[in] | newMaxTime | an MTime containing the new frame |
Set the values of the first and last frames of the playback time range.
[in] | min | an MTime containing the new first frame |
[in] | max | an MTime containing the new last frame |
MTime MAnimControl::animationStartTime | ( | ) | [static] |
Return an MTime specifying the first frame of the animation, as specified by the Maya user in the Range Slider UI. This corresponds to the animationStartTime which can also be set and queried using the playbackOptions mel command.
MTime MAnimControl::animationEndTime | ( | ) | [static] |
Set the value of the first frame in the animation.
[in] | newStartTime | an MTime containing the new first frame |
Set the value of the last frame in the animation.
[in] | newEndTime | an MTime containing the new last frame |
Set the values of the first and last frames in the animation.
[in] | newStartTime | an MTime containing the new first frame |
[in] | newEndTime | an MTime containing the new last frame |
MTime MAnimControl::currentTime | ( | ) | [static] |
Set the current animation frame.
[in] | newTime | an MTime containing the new animation frame |
double MAnimControl::playbackSpeed | ( | ) | [static] |
Return the speed with with to play the animation.
MStatus MAnimControl::setPlaybackSpeed | ( | double | newSpeed | ) | [static] |
Set the desired speed factor at which the animation will play back.
[in] | newSpeed | the new speed factor |
MStatus MAnimControl::playForward | ( | ) | [static] |
Start playing the current animation forwards.
MStatus MAnimControl::playBackward | ( | ) | [static] |
Start playing the current animation backwards.
bool MAnimControl::isPlaying | ( | ) | [static] |
Return a value indicating whether Maya is currently playing the animation.
MStatus MAnimControl::stop | ( | ) | [static] |
Stop playing the current animation.
bool MAnimControl::autoKeyMode | ( | ) | [static] |
Return the autoKeyMode.
MStatus MAnimControl::setAutoKeyMode | ( | bool | mode | ) | [static] |
Set the autoKeyMode.
[in] | mode | a boolean specifying the new mode |
MFnAnimCurve::TangentType MAnimControl::globalInTangentType | ( | MStatus * | ReturnStatus = NULL |
) | [static] |
Return the current global in tangent type.
[out] | ReturnStatus | Status Code (see below) |
MStatus MAnimControl::setGlobalInTangentType | ( | const MFnAnimCurve::TangentType & | tangentType | ) | [static] |
Set the current global in tangent type.
[in] | tangentType | the global in tangent type to set [Note: MFnAnimCurve::kTangentGlobal and MFnAnimCurve::kTangentFixed are not valid arguments] |
MFnAnimCurve::TangentType MAnimControl::globalOutTangentType | ( | MStatus * | ReturnStatus = NULL |
) | [static] |
Return the current global out tangent type.
[out] | ReturnStatus | Status Code (see below) |
MStatus MAnimControl::setGlobalOutTangentType | ( | const MFnAnimCurve::TangentType & | tangentType | ) | [static] |
Set the current global out tangent type.
[in] | tangentType | the global out tangent type to set [Note: MFnAnimCurve::kTangentGlobal and MFnAnimCurve::kTangentFixed are not valid arguments] |
bool MAnimControl::weightedTangents | ( | MStatus * | ReturnStatus = NULL |
) | [static] |
Determine whether or not the tangents on the Anim Curve are weighted.
[out] | ReturnStatus | Status Code |
MStatus MAnimControl::setWeightedTangents | ( | bool | weightState | ) | [static] |
Sets whether or not the tangents on the Anim Curve are weighted. Note: switching a curve from weightedTangents true to false and back to true again will not preserve fixed tangents properly. Use undo instead.
[in] | weightState | a boolean specifying whether tangents should be weighted or not |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |