#include
<MAnimControl.h>
List of all
members.
Detailed Description
Control over animation playback and values.
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.
Member Enumeration Documentation
Animation playback modes.
- Enumerator:
-
kPlaybackOnce |
Play once then stop. |
kPlaybackLoop |
Play continuously. |
kPlaybackOscillate |
Play forwards, then backwards continuously. |
Animation playback viewing modes.
- Enumerator:
-
kPlaybackViewAll |
Playback in all views. |
kPlaybackViewActive |
Playback in only the active view. |
Constructor & Destructor Documentation
MAnimControl::MAnimControl |
( |
|
) |
|
MAnimControl::~MAnimControl |
( |
|
) |
[virtual] |
Member Function Documentation
Set the current playback mode.
- Parameters:
-
- Returns:
-
Set the current viewing mode. Controls whether the animation is
run in only the active view, or simultaneously in all views.
- Parameters:
-
- Returns:
-
double MAnimControl::playbackBy |
( |
|
) |
[static] |
Return a double specifying the increment between times viewed
during the playing of the animation.
- Returns:
- A double containing the increment
MStatus MAnimControl::setPlaybackBy |
( |
const double & |
newTime |
) |
[static] |
Specify the increment between times viewed during the playing of
the animation.
- Parameters:
-
[in] |
newTime |
a double containing the new increment |
- Returns:
-
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.
- Returns:
- An MTime
instance specifying the first frame of the playback time range
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.
- Returns:
- An MTime
instance specifying the last frame of the playback time range
MStatus MAnimControl::setMinTime |
( |
MTime |
newMinTime |
) |
[static] |
Set the first frame of the current playback time range.
- Parameters:
-
[in] |
newMinTime |
an MTime
containing the frame |
- Returns:
-
MStatus MAnimControl::setMaxTime |
( |
MTime |
newMaxTime |
) |
[static] |
Set the value of the last frame of the current playback time
range.
- Parameters:
-
[in] |
newMaxTime |
an MTime
containing the new frame |
- Returns:
-
Set the values of the first and last frames of the playback time
range.
- Parameters:
-
[in] |
min |
an MTime
containing the new first frame |
[in] |
max |
an MTime
containing the new last frame |
- Returns:
-
- MS::kSuccess the
first and last frames were changed successfully
- MS::kFailure neither the
first or last frames were changed
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.
- Returns:
- An MTime
instance specifying the first frame of the animation
MTime MAnimControl::animationEndTime |
( |
|
) |
[static] |
Return an MTime
specifying the last frame of the animation, as specified by the
Maya user in the Range Slider UI. This corresponds to the
animationEndTime which can also be set and queried using the
playbackOptions mel command.
- Returns:
- An MTime
instance specifying the last frame in the animation
MStatus
MAnimControl::setAnimationStartTime |
( |
MTime |
newStartTime |
) |
[static] |
Set the value of the first frame in the animation.
- Parameters:
-
[in] |
newStartTime |
an MTime
containing the new first frame |
- Returns:
-
MStatus
MAnimControl::setAnimationEndTime |
( |
MTime |
newEndTime |
) |
[static] |
Set the value of the last frame in the animation.
- Parameters:
-
[in] |
newEndTime |
an MTime
containing the new last frame |
- Returns:
-
MStatus
MAnimControl::setAnimationStartEndTime |
( |
MTime |
newStartTime, |
|
|
MTime |
newEndTime |
|
|
) |
|
|
[static] |
Set the values of the first and last frames in the
animation.
- Parameters:
-
[in] |
newStartTime |
an MTime
containing the new first frame |
[in] |
newEndTime |
an MTime
containing the new last frame |
- Returns:
-
- MS::kSuccess the
first and last frames were changed successfully
- MS::kFailure neither the
first or last frames were changed
MTime MAnimControl::currentTime |
( |
|
) |
[static] |
Return an MTime
instance containing the current animation frame.
- Returns:
- An MTime
containing the current animation frame
MStatus MAnimControl::setCurrentTime |
( |
const MTime & |
newTime |
) |
[static] |
Set the current animation frame.
- Parameters:
-
[in] |
newTime |
an MTime
containing the new animation frame |
- Returns:
-
double MAnimControl::playbackSpeed |
( |
|
) |
[static] |
Return the speed with with to play the animation.
- Returns:
- The desired playback speed factor
MStatus
MAnimControl::setPlaybackSpeed |
( |
double |
newSpeed |
) |
[static] |
Set the desired speed factor at which the animation will play
back.
- Parameters:
-
[in] |
newSpeed |
the new speed factor |
- Returns:
-
MStatus MAnimControl::playForward |
( |
|
) |
[static] |
Start playing the current animation forwards.
- Returns:
-
MStatus MAnimControl::playBackward |
( |
|
) |
[static] |
Start playing the current animation backwards.
- Returns:
-
bool MAnimControl::isPlaying |
( |
|
) |
[static] |
Return a value indicating whether Maya is currently playing the
animation.
- Returns:
-
- true the animation is currently playing
- false the animation is not currently playing
MStatus MAnimControl::stop |
( |
|
) |
[static] |
Stop playing the current animation.
- Returns:
-
bool MAnimControl::autoKeyMode |
( |
|
) |
[static] |
Return the autoKeyMode.
- Returns:
-
- true the autoKeyMode is on
- false the autoKeyMode is off
MStatus MAnimControl::setAutoKeyMode |
( |
bool |
mode |
) |
[static] |
Set the autoKeyMode.
- Parameters:
-
[in] |
mode |
a boolean specifying the new mode |
- Returns:
-
Return the current global in tangent type.
- Parameters:
-
[out] |
ReturnStatus |
Status Code (see below) |
- Returns:
-
- Status Codes:
-
Set the current global in tangent type.
- Parameters:
-
- Returns:
-
- MS::kSuccess the
current global in tangent type was set successfully
- MS::kFailure the current
global in tangent type was not changed
Return the current global out tangent type.
- Parameters:
-
[out] |
ReturnStatus |
Status Code (see below) |
- Returns:
- The current global out tangent type
- Status Codes:
-
Set the current global out tangent type.
- Parameters:
-
- Returns:
-
- MS::kSuccess the
current global out tangent type was set successfully
- MS::kFailure the current
global out tangent type was not changed
bool MAnimControl::weightedTangents |
( |
MStatus * |
ReturnStatus =
NULL |
) |
[static] |
Determine whether or not the tangents on the Anim Curve are
weighted.
- Parameters:
-
[out] |
ReturnStatus |
Status Code |
- Returns:
-
- true the tangents on the Anim Curve are weighted
- false the tangents on the Anim Curve are not
weighted
- Status Codes:
-
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.
- Parameters:
-
[in] |
weightState |
a boolean specifying whether tangents should be weighted or
not |
- Returns:
-