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

Synopsis

playblast( filename , [activeEditor=boolean], [cameraSetup=[string, string]], [clearCache=boolean], [combineSound=boolean], [completeFilename=string], [compression=string], [endTime=time], [filename=string], [forceOverwrite=boolean], [format=string], [frame=time], [framePadding=int], [height=int], [indexFromZero=boolean], [offScreen=boolean], [options=boolean], [percent=int], [quality=int], [rawFrameNumbers=boolean], [replaceAudioOnly=boolean], [replaceEndTime=time], [replaceFilename=boolean], [replaceStartTime=time], [sequenceTime=boolean], [showOrnaments=boolean], [sound=string], [startTime=time], [viewer=boolean], [width=int], [widthHeight=[int, int]])

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

playblast is undoable, NOT queryable, and NOT editable.

This command playblasts the current playback range. Sound is optional.

Return value

string Name of moviefile created.

Flags

activeEditor, cameraSetup, clearCache, combineSound, completeFilename, compression, endTime, filename, forceOverwrite, format, frame, framePadding, height, indexFromZero, offScreen, options, percent, quality, rawFrameNumbers, replaceAudioOnly, replaceEndTime, replaceFilename, replaceStartTime, sequenceTime, showOrnaments, sound, startTime, viewer, width, widthHeight
Long name (short name) Argument types Properties
startTime(st) time create
Specify the start time of the playblast. Default is the start time of the playback range displayed in the Time Slider. Overridden by -frame.
endTime(et) time create
Specify the end time of the playblast. Default is the end time of the playback range displayed in the Time Slider. Overridden by -frame.
sequenceTime(sqt) boolean create
Use sequence time
sound(s) string create
Specify the sound node to be used during playblast
filename(f) string create
The filename to use for the output of this playblast. If the file already exists, a confirmation box will be displayed if playblast is performed interactively. If playblast is executed from the command line and the file already exists, it will abort.
forceOverwrite(fo) boolean create
Overwrite existing playblast files which may have the the same name as the one specified with the "-f" flag
format(fmt) string create
The format of the output of this playblast. Valid values and their meanings:
-- "movie" This will result in the defaulting movie format on a given platform On Windows, the out is AVI format and the player is Microsoft Media Player. On Mac OSX, the output is of type QuickTime and the player is QuickTime. On Unix, this option outputs SGI's movie format and sets the default viewing command to "movieplayer". The resulting file is named according to the "-f" flag, if specified.
-- "avi" Set the format to use avi as the output format. Only supported on Windows.
-- "qt" QuickTime. Supported on all platforms but 64 bit windows.
-- "sgi" Use the older sgi format. -- "image" outputs a sequence of image files and sets the viewing command to the application specified in the preferences by the user. If no application is specified, it sets viewing command to "fcheck". The image format will be the Output Format specified using Render->RenderGlobals. The resulting files use the value of the "-f" flag as a prefix, with an appended frame number, as in "myFile.0007.iff"
The default value of the -fmt/format flag is "movie".
frame(fr) time createmultiuse
List of frames to blast. One frame specified per flag. The frames can be specifed in any order but will be output in an ordered sequence. When specified this flag will override any start/end range
percent(p) int create
Percentage of current view size to use during blasting. Accepted values are integers between 10 and 100. All other values are clamped to be within this range. A value of 25 means 1/4 of the current view size; a value of 50 means half the current view size; a value of 100 means full size. (Default is 50.)
compression(c) string create
Specify the compression to use for the movie file. Use the command `playblast -options` command to launch a dialog to determine wich setting are avalible for a given platform.
quality(qlt) int create
Specify the compression quality factor to use for the movie file. Value should be in the 0-100 range
options(o) boolean create
Brings up a dialog for setting playblast options, and does not run the playblast.
viewer(v) boolean create
Specify whether a viewer should be launched for the playblast. Default is "true". Runs "fcheck" when -fmt is "image". The player for movie files depends on the OS: Windows uses Microsoft Media Player, Irix uses movieplayer, OSX uses QuickTime.
width(w) int create
Width of the final image. This value will be clamped if larger than the width of the active window.
Windows: If not using fcheck, the width and height must each be divisible by 4.
height(h) int create
Height of the final image. This value will be clamped if larger than the width of the active window.
Windows: If not using fcheck, the width and height must each be divisible by 4.
widthHeight(wh) [int, int] create
Final image's width and height. Values larger than the dimensions of the active window are clamped. A width and height of 0 means to use the window's current size.
Windows: If not using fcheck, the width and height must each be divisible by 4.
showOrnaments(orn) boolean create
Sets whether or not model view ornaments (e.g. the axis icon) should be displayed
clearCache(cc) boolean create
When true, all previous temporary playblast files will be deleted before the new playblast files are created. Any playblast files that were explicitly given a name by the user will not be deleted. All remaining temporary playblast files will be deleted when the application quits regardless of whether this flag was set.
offScreen(os) boolean create
When set, this toggle allow playblast to use an offscreen buffer to render the view. This allows playblast to work when the application is iconified, or obscured. This flag is only supported on Linux.
completeFilename(cf) string create
When set, this string specifies the exact name of the output image. In contrast with the -f/filename flag, -cf/completeFilename does not append any frame number or extension string at the end of the filename. Additionally, playblast will not delete the image from disk after it is displayed. This flag should not be used in conjunction with -f/filename.
framePadding(fp) int create
Number of zeros used to pad file name. Typically set to 4 to support fcheck.
rawFrameNumbers(rfn) boolean create
Playblast typically numbers its frames sequentially, starting at zero. This flag will override the default action and frames will be numbered using the actual frames specified by the -frame or -startFrame/-endFrame flags.
replaceStartTime(rst) time create
Specify the start time of a replayblast of an existing playblast. Default is the start time of the playback range displayed in the Time Slider. Overridden by -frame.
replaceEndTime(ret) time create
Specify the end time of a replayblast of an existing playblast. Default is the start time of the playback range displayed in the Time Slider. Overridden by -frame.
replaceFilename(rf) boolean create
When set, this string specifies the name of an input playblast file which will have frames replaced according to the replace start and end times.
replaceAudioOnly(rao) boolean create
When set, this string dictates that only the audio will be replaced when the scene is re-playblasted.
indexFromZero(ifz) boolean create
Output frames starting with file.0000.ext and incrementing by one. Typically frames use the Maya time as their frame number. This option can only be used for frame based output formats.
cameraSetup(cs) [string, string] createmultiuse
Information about camera setup. The first string defines a camera setup MEL procedure. The camera setup procedure will be invoked before executing a playblast. The second string argument which is used as a camera identifier and is appended to the root file name to specify the final output file name(s). The command will fail there is not a pair of strings supplied to the argument.
activeEditor(ae) boolean create
This flag will return the current model editor that would be used for playblast. It does not invoke playblast itself.
combineSound(csd) boolean create
Combine the trax sounds into a single track. This might force a resampling of the sound if the sound paramters don't match up.

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

# Run movieplayer on the currently playblasted range
# (including sound) and save the movie to a file.
#
cmds.playblast( s="ohNo", f="myMovie.mv" )

# Run movieplayer on the currently playblasted range
# (at 60% of the size of the current view), and
# save the movie to file "myMovie.mv" and don't
# launch any viewing program.
#
cmds.playblast( p=60, s="ohNo", f="myMovie.mv", v=False )

# Output frames 2, 3, 8 as images and launch the viewer;
#
cmds.playblast( frame=[8,3,2], format="image", viewer=True )