Go to: Synopsis. Return value. Flags. Python examples.
render(
[camera]
, [abortMissingTexture=boolean], [batch=boolean], [keepPreImage=boolean], [layer=string], [nglowpass=boolean], [nshadows=boolean], [replace=boolean], [xresolution=int], [yresolution=int])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
render is NOT undoable, NOT queryable, and NOT editable.
The render command is used to start off a MayaSoftware rendering
session of the currently active camera. If a rendering is already
in progress, then this command stops the rendering. This command is
not undoable.
string | The name of the rendered image. |
abortMissingTexture, batch, keepPreImage, layer, nglowpass, nshadows, replace, xresolution, yresolution
Long name (short name) |
Argument types |
Properties |
xresolution(x)
|
int
|
|
|
yresolution(y)
|
int
|
|
|
nshadows(nsh)
|
boolean
|
|
|
Shadowing capabilities (can turn off shadow globally
by setting this value to false)
|
|
nglowpass(ngl)
|
boolean
|
|
|
Overwrite glow pass capabilities (can turn off glow pass globally
by setting this value to false)
|
|
batch(b)
|
boolean
|
|
|
Run in batch mode. Compute the images for all renderable
cameras. This is the mel equivalent of running maya in batch
mode with the -render flag set. All other flags are ignored
when -batch is used.
|
|
keepPreImage(kpi)
|
boolean
|
|
|
Keep the renderings prior to post-process around. Only
available when -batch is set
|
|
replace(rep)
|
boolean
|
|
|
Replace the rendered image if it already exists. Only
available when -batch is set
|
|
abortMissingTexture(amt)
|
boolean
|
|
|
Abort renderer when encountered missing texture. Only
available when -batch is set
|
|
layer(l)
|
string
|
|
|
Render the specified render layer.
Only this render layer will be rendered,
regardless of the renderable attribute value of the render layer.
The layer name will be appended to the output image file name.
The specified render layer becomes the current render layer before rendering,
and remains as current render layer after the rendering.
|
|
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.
|
import maya.cmds as cmds
cmds.render()
cam = cmds.camera()
cmds.render( cam[0], x=768, y=576 )