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

Synopsis

glRender [-accumBufferPasses int] [-alphaSource string] [-antiAliasMethod string] [-cameraIcons boolean] [-clearClr float float float] [-collisionIcons boolean] [-crossingEffect boolean] [-currentFrame] [-drawStyle string] [-edgeSmoothness float] [-emitterIcons boolean] [-fieldIcons boolean] [-flipbookCallback string] [-frameEnd int] [-frameIncrement int] [-frameStart int] [-fullResolution boolean] [-grid boolean] [-imageDirectory string] [-imageName string] [-imageSize int int float] [-lightIcons boolean] [-lightingMode string] [-lineSmoothing boolean] [-offScreen boolean] [-renderFrame string] [-renderSequence string] [-sharpness float] [-shutterAngle float] [-textureDisplay boolean] [-transformIcons boolean] [-useAccumBuffer boolean] [-viewport int int float] [-writeDepthMap boolean]

glRender is undoable, queryable, and editable.

This command provides access to the Hardware Render Manager (HRM). There is one-and-only-one HRM in maya. The HRM controls the rendering performed in the hardware render buffer window. This command allows shell scripts, to modify the render state, and to initiate a render request.

Return value

None

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

Flags

accumBufferPasses, alphaSource, antiAliasMethod, cameraIcons, clearClr, collisionIcons, crossingEffect, currentFrame, drawStyle, edgeSmoothness, emitterIcons, fieldIcons, flipbookCallback, frameEnd, frameIncrement, frameStart, fullResolution, grid, imageDirectory, imageName, imageSize, lightIcons, lightingMode, lineSmoothing, offScreen, renderFrame, renderSequence, sharpness, shutterAngle, textureDisplay, transformIcons, useAccumBuffer, viewport, writeDepthMap
Long name (short name) Argument types Properties
-accumBufferPasses(-abp) int queryedit
Set the number of accum buffer render passes.
-alphaSource(-as) string queryedit
Control the alpha source when writing image files. Valid values include: off, alpha, red, green, blue, luminance, clamp, invClamp.
-antiAliasMethod(-aam) string queryedit
Set the method used for anti-aliasing polygons: off, uniform, gaussian.
-cameraIcons(-ci) boolean queryedit
Set display status of camera icons.
-clearClr(-cc) float float float queryedit
Set the viewport clear color (0 - 1).
-collisionIcons(-coi) boolean queryedit
Set display status of collison model icons.
-crossingEffect(-ce) boolean queryedit
Enable/disable image filtering with a convolution filter.
-currentFrame(-cf) query
Returns the current frame being rendered.
-drawStyle(-ds) string queryedit
Set the object drawing style: boundingBox, points, wireframe, flatShaded, smoothShaded.
-edgeSmoothness(-es) float queryedit
Controls the amount of edge smoothing. A value of 0.0 gives no smoothing, 1.0 gives default smoothing, and any other value scales the amount of default smoothing. Must enable the accumulation buffer.
-emitterIcons(-ei) boolean queryedit
Set display status of emitter icons.
-fieldIcons(-fii) boolean queryedit
Set display status of field icons.
-flipbookCallback(-fc) string queryedit
Register a procedure to be called after the render sequence has completed. Used to build the flipbook pulldown menu. See the example section for more details about how to build this procedure.
-frameEnd(-fe) int queryedit
Set the last frame to be rendered.
-frameIncrement(-fi) int queryedit
Set the frame increment during rendering.
-frameStart(-fs) int queryedit
Set the first frame to be rendered.
-fullResolution(-fr) boolean queryedit
Enable/disable rendering to full image output resolution. Must set a valid image output resolution (-is).
-grid(-gr) boolean queryedit
Set display status of the grid.
-imageDirectory(-id) string queryedit
Set the directory for the image files.
-imageName(-in) string queryedit
Set the base name of the image files.
-imageSize(-is) int int float queryedit
Set the image output size. Takes width, height and aspect ratio. Pass 0,0,0 to use current port size. The image size must be equal to or greater then the viewport size. Large images will be tiled if full resolution rendering has been enabled (-fr/fullResolution).
-lightIcons(-li) boolean queryedit
Set display status of light icons.
-lightingMode(-lm) string queryedit
Set the lighting mode used for rendering: all, selected, default.
-lineSmoothing(-ls) boolean queryedit
Enable/disable anti-aliased lines.
-offScreen(-os) boolean queryedit
When set, this toggle allow HRM to use an offscreen buffer to render the view. This allows HRM to work when the application is iconified, or obscured
-renderFrame(-rf) string queryedit
Render the current frame. Requires the name of the view in which to render.
-renderSequence(-rs) string queryedit
Render the current frame sequence. Requires the name of the view in which to render.
-sharpness(-sh) float queryedit
Control the sharpness level of the convolution filter.
-shutterAngle(-sa) float queryedit
Set the shutter angle used for motion blur (0 - 1). A value of 0.0 gives no blurring, 0.5 gives correct blurring, and 1.0 gives continuous blurring. Must enable the accumulation buffer.
-textureDisplay(-txd) boolean queryedit
Enable/disable texture map display.
-transformIcons(-ti) boolean queryedit
Set display status of transform icons.
-useAccumBuffer(-uab) boolean queryedit
Enable/disable the accumulation buffer.
-viewport(-vp) int int float queryedit
Set the viewport size. Pass in the width, height and aspect ratio. This size will be used for all test rendering and image output size unless full resolution (-fr) has been set and a valid image output size (-is) has been set.
-writeDepthMap(-wdm) boolean queryedit
Enable/disable writing of zdepth to image files.

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 be used more than once in a command.

MEL examples

// Printing information after the hardware render has finished.

global proc endHardwareRender(
    string $image, int $fs, int $fe, int $fi, int $rate,
    string $path, string $filename )
{
    print "Finished hardware render\n";
    print ("    Image name       "+$image+"\n");
    print ("    Frames           "+$fs+" to "+$fe+" by "+$fi+"\n");
    print ("    Frame rate       "+$rate+"\n");
    print ("    File path        "+$path+"\n");
    print ("    Filename pattern "+$filename+"\n");
}

glRender -e -fc endHardwareRender;