pymel.core.animation.playbackOptions¶
- 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 Sets the end time of the animation. Query returns a float. animationStartTime / ast time Sets the start time of the animation. Query returns a float. blockingAnim / ba bool All tangents playback as stepped so that animation can be viewed in pure pose-to-pose form by / by float Increment between times viewed during playback. (Default 1.0) framesPerSecond / fps bool Queries the actual playback rate. Query returns a float. loop / l unicode Controls if and how playback repeats. Valid values are once,continuous,and oscillate.Query returns string. maxPlaybackSpeed / mps float 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 Sets the end of the playback time range. Query returns a float. minTime / min time Sets the start of the playback time range. Query returns a float. playbackSpeed / ps float Sets the desired playback speed. Query returns a float. view / v unicode Controls how many modelling views update during playback. Valid values are alland active. Query returns a string. Flag can have multiple arguments, passed either as a tuple or a list. 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 #