Go to: Synopsis. Return value. Keywords.
Flags. Python
examples.
ogsRender([batchMode=boolean], [camera=string], [currentView=boolean], [fileName=string], [height=uint], [width=uint])
Note: Strings representing object names and
arguments must be separated by commas. This is not depicted in the
synopsis.
ogsRender is NOT undoable, queryable, and NOT
editable.
Renders an image or a sequence using the OGS rendering engine
In query mode, return type is based on queried flag.
ogs, offline, rendering
batchMode, camera, currentView, fileName, height,
width
Long name (short name) |
Argument types |
Properties |
width(w) |
uint |
|
|
The width flag pass the width to the ogsRender command. If not
used, the width is taken from the render globals settings. |
|
height(h) |
uint |
|
|
The height flag pass the height to the ogsRender command. If
not used, the height is taken from the render globals
settings. |
|
camera(cam) |
string |
|
|
Specify the camera to use. Use the first available camera if
the camera given is not found. |
|
currentView(cv) |
boolean |
|
|
When turned on, only the current view will be rendered. |
|
fileName(fn) |
string |
|
|
Specify the output file name. It will try to save the image
with format according to the file name extension. |
|
batchMode(bm) |
boolean |
|
|
When turned on, means the action will be run in batch
mode. |
|
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
# Create a poly sphere.
cmds.polySphere()
# Render it
# It will try to save the image with format according
# to the file name extension.
cmds.ogsRender(w=480,h=270,fn="c:\\hello.jpg")
cmds.ogsRender(w=480,h=270,fn="c:\\hello.bmp")