pymel.core.animation.playbackOptions

static animation.playbackOptions(*args, **kwargs)

This command sets/queries certain values associated with playback: looping style, start/end times, etc. Only commands modifying the -minTime/maxTime, the -animationStartTime/animationEndTime, or the -by value are undoable.

Flags:
Long name (short name) Argument Types Properties
animationEndTime (aet) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Sets the end time of the animation. Query returns a float.
animationStartTime (ast) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Sets the start time of the animation. Query returns a float.
by (by) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Increment between times viewed during playback. (Default 1.0) Flag can have multiple arguments, passed either as a tuple or a list.
framesPerSecond (fps) bool ../../../_images/create.gif ../../../_images/query.gif
 
Queries the actual playback rate. Query returns a float.
loop (l) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Controls if and how playback repeats. Valid values are once,continuous,and oscillate.Query returns string.
maxPlaybackSpeed (mps) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Sets the desired maximum playback speed. Query returns a float. The maxPlaybackSpeed is only used by Maya when your playbackSpeed is 0 (play every frame). The maxPlaybackSpeed will clamp the maximum playback rate to prevent it from going more than a certain amount. A maxPlaybackSpeed of 0 will give free (unclamped) playback.

maxTime (max) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Sets the end of the playback time range. Query returns a float.
minTime (min) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Sets the start of the playback time range. Query returns a float.
playbackSpeed (ps) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Sets the desired playback speed. Query returns a float.
view (v) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Controls how many modelling views update during playback. Valid values are alland active. Query returns a string.

Derived from mel command maya.cmds.playbackOptions

Example:

import pymel.core as pm

pm.playbackOptions( loop='continuous' )
# Result: u'continuous' #
pm.playbackOptions( minTime='0sec', maxTime='1sec' )
# Result: 0.0 #

# Playback every 2nd frame
#
pm.playbackOptions( by=2 )
# Result: 2.0 #

Previous topic

pymel.core.animation.play

Next topic

pymel.core.animation.playblast

Core

Core Modules

Other Modules

This Page