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

Synopsis

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

Return value

boolean

In query mode, return type is based on queried flag.

Keywords

ogs, offline, rendering

Flags

batchMode, camera, currentView, fileName, height, width
Long name (short name) Argument types Properties
width(w) uint createquery
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 createquery
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 createquery
Specify the camera to use. Use the first available camera if the camera given is not found.
currentView(cv) boolean createquery
When turned on, only the current view will be rendered.
fileName(fn) string createquery
Specify the output file name. It will try to save the image with format according to the file name extension.
batchMode(bm) boolean createquery
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.

Python examples

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")