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

Synopsis

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.

Return value

stringThe name of the rendered image.

Flags

abortMissingTexture, batch, keepPreImage, layer, nglowpass, nshadows, replace, xresolution, yresolution
Long name (short name) Argument types Properties
xresolution(x) int create
Overwrite x resolution
yresolution(y) int create
Overwrite y resolution
nshadows(nsh) boolean create
Shadowing capabilities (can turn off shadow globally by setting this value to false)
nglowpass(ngl) boolean create
Overwrite glow pass capabilities (can turn off glow pass globally by setting this value to false)
batch(b) boolean create
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 create
Keep the renderings prior to post-process around. Only available when -batch is set
replace(rep) boolean create
Replace the rendered image if it already exists. Only available when -batch is set
abortMissingTexture(amt) boolean create
Abort renderer when encountered missing texture. Only available when -batch is set
layer(l) string create
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.

Python examples

import maya.cmds as cmds

cmds.render()

cam = cmds.camera()
cmds.render( cam[0], x=768, y=576 )