pymel.core.rendering.render

render(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
abortMissingTexture (amt) bool ../../../_images/create.gif
 
Abort renderer when encountered missing texture. Only available when -batch is set
batch (b) bool ../../../_images/create.gif
 

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) bool ../../../_images/create.gif
 
Keep the renderings prior to post-process around. Only available when -batch is set
layer (l) unicode ../../../_images/create.gif
 

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 commandFlag can have multiple arguments, passed either as a tuple or a list.

nglowpass (ngl) bool ../../../_images/create.gif
 
Overwrite glow pass capabilities (can turn off glow pass globally by setting this value to false)
nshadows (nsh) bool ../../../_images/create.gif
 
Shadowing capabilities (can turn off shadow globally by setting this value to false)
replace (rep) bool ../../../_images/create.gif
 
Replace the rendered image if it already exists. Only available when -batch is set
xresolution (x) int ../../../_images/create.gif
 
Overwrite x resolution
yresolution (y) int ../../../_images/create.gif
 
Overwrite y resolution

Derived from mel command maya.cmds.render

Example:

import pymel.core as pm

import maya.cmds as cmds

pm.render()
# Result: u'/Users/chad/Documents/maya/projects/default/images/tmp/untitled.iff' #

cam = pm.camera()
pm.render( cam[0], x=768, y=576 )
# Result: u'/Users/chad/Documents/maya/projects/default/images/tmp/untitled.iff' #

Previous topic

pymel.core.rendering.rampColorPort

Next topic

pymel.core.rendering.renderGlobalsNode

Core

Core Modules

Other Modules

This Page