This command starts and stops playback. In order to change the frame range of playback, see the playbackOptions command. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
forward (f) | bool | ||
When true, play back the animation from the currentTime to the maximum of the playback range. When false, play back from the currentTime to the minimum of the playback range. When queried, returns an int. |
|||
playSound (ps) | bool | ||
Specify whether or not sound should be used during playbackFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
record (rec) | bool | ||
|
|||
sound (s) | unicode | ||
|
|||
state (st) | bool | ||
|
|||
wait (w) | bool | ||
|
Derived from mel command maya.cmds.play
Example:
import pymel.core as pm
import maya.cmds as cmds
# Begin playback from min to max
#
pm.play( forward=True )
# Begin playback from max to min
#
pm.play( forward=False )
# Stop (forward or backward) playback
#
pm.play( state=False )
# Record mode through one playback loop
#
pm.play( record=True )
# Are we playing back? Returns 1 if yes, 0 if no.
#
pm.play( q=True, state=True )
# Result: True #