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

Synopsis

play [-forward boolean] [-playSound boolean] [-record] [-sound string] [-state boolean] [-wait]

play is undoable, queryable, and NOT editable.

This command starts and stops playback. In order to change the frame range of playback, see the playbackOptions command.

Return value

None

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

Flags

forward, playSound, record, sound, state, wait
Long name (short name) Argument types Properties
-forward(-f) boolean createquery
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.
-state(-st) boolean createquery
start or stop playing back
-record(-rec) createquery
enable the recording system and start one playback loop
-wait(-w) create
Wait till completion before returning control to command Window.
-sound(-s) string createquery
Specify the sound node to be used during playback
-playSound(-ps) boolean createquery
Specify whether or not sound should be used during playback

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 be used more than once in a command.

MEL examples

// Begin playback from min to max
//
play -forward true;
// Begin playback from max to min
//
play -forward false;
// Stop (forward or backward) playback
//
play -state off;
// Record mode through one playback loop
//
play -record;
// Are we playing back?  Returns 1 if yes, 0 if no.
//
play -q -state;