Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

playbackOptions([animationEndTime=time], [animationStartTime=time], [blockingAnim=boolean], [by=float], [framesPerSecond=boolean], [loop=string], [maxPlaybackSpeed=float], [maxTime=time], [minTime=time], [playbackSpeed=float], [view=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

playbackOptions is undoable, queryable, and editable.

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.

Return value

stringor float Query of edited option.

In query mode, return type is based on queried flag.

Flags

animationEndTime, animationStartTime, blockingAnim, by, framesPerSecond, loop, maxPlaybackSpeed, maxTime, minTime, playbackSpeed, view
Long name (short name) Argument types Properties
loop(l) string createqueryedit
Controls if and how playback repeats. Valid values are "once," "continuous," and "oscillate." Query returns string.
minTime(min) time createqueryedit
Sets the start of the playback time range. Query returns a float.
maxTime(max) time createqueryedit
Sets the end of the playback time range. Query returns a float.
animationStartTime(ast) time createqueryedit
Sets the start time of the animation. Query returns a float.
animationEndTime(aet) time createqueryedit
Sets the end time of the animation. Query returns a float.
playbackSpeed(ps) float createqueryedit
Sets the desired playback speed. Query returns a float.
maxPlaybackSpeed(mps) float createqueryedit
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.
framesPerSecond(fps) boolean createquery
Queries the actual playback rate. Query returns a float.
view(v) string createqueryedit
Controls how many modelling views update during playback. Valid values are "all" and "active". Query returns a string.
by(by) float createqueryedit
Increment between times viewed during playback. (Default 1.0)
blockingAnim(ba) boolean createquery
All tangents playback as stepped so that animation can be viewed in pure pose-to-pose form

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.playbackOptions( loop='continuous' )
cmds.playbackOptions( minTime='0sec', maxTime='1sec' )
# Playback every 2nd frame
#
cmds.playbackOptions( by=2 )