Common flags for the command line renderer

The following table contains the common flags shared by all the renderers. To view these, type the following in a shell or Terminal (macOS) window:

Render -help

These options complete the list of all options that you can use with:

Common options

Flag name Definition

-test

Print MEL commands but do not execute them.

-verb

Print MEL commands before they are executed.

-keepMel

Keep the temporary MEL file.

-listRenderers

Lists all available renderers.

-renderer <string> or -r <string>

Use this specific renderer: sw, hw, vr, file.

-proj <string>

Use this Maya project to load the file.

-log <string>

Specifies a render log file and location. The log file contains the standard output and standard error information.

This flag is only valid on the Windows platform.

As an alternative to using this flag, you can also use command redirection operators such as >, >>, or I to write log files.

-pythonver [2|3]

Specifies the version of Python to use when running scripts. Use -pythonver 2 to run the script using Python 2. Use -pythonver 3 to run the script using Python 3.

Note: Python 2 is only available on Linux and Windows.

General purpose flags

Flag Definition
-rd <path>

Directory in which to store image files.

-im <filename>

Image file output name.

-fnc <int>

Frame/Animation ext, such as name, name.ext. For details, see the Render Settings: Common tab.

-of <format>

Output image file format. For supported file formats, see the Image format drop-down list of the Render Settings window.

Frame numbering options

Flag Definition
-s <float>

Start frame for an animation sequence.

-e <float>

End frame for an animation sequence.

-b <float>

By frame (or step) for an animation sequence.

-pad <int>

Number of digits in the output image frame file name extension.

-rfs <int>

Renumber frames: Start number - number for the first image when rendering.

-rfb <int>

Renumber frames: By frame - step used for renumbering frames.

-skipExistingFrames

Enable this option so that the renderer detects and skips over frames that have already been rendered. This feature saves rendering time.

Camera Options

Flag Definition
-cam <name>

Specify which camera to be used.

-rgb <boolean>

Turn RGB output on or off.

-alpha <boolean>

Turn Alpha output on or off.

-depth <boolean> Specify whether the rendered images contain a depth channel.

Resolution options

Flag Definition
-x <int>

Set X resolution of the final image.

-y <int>

Set Y resolution of the final image.

-percentRes <float>

Renders the image using the specified percent of the resolution.

-ard <float>

(Software renderer)

Device aspect ratio for the rendered image.

-par <float>

(Hardware renderer, Vector renderer)

Pixel aspect ratio for the rendered image.

-x <int>

Set X resolution of the final image.

Render Layers and Passes

Flag Definition
-rl <boolean:name>

Render each render layer separately.

Applicable to both legacy render layers and render setup.

-rp <boolean:name>

Render passes separately.

Only applicable to legacy render layers.

-sel <boolean:name>

Selects which objects, groups, and/or sets to render.

Render Setup

Use the following flags in conjunction with the render setup system. See Apply render setup template files during batch render.

Flag Definition
-rst <string:filename>

Apply a render setup template to your scene file before command line rendering. Only .json templates that you have previously exported via File > Export All in the Render Setup editor are supported. Templates that you exported via File > Export Selected are not supported.

-rsp <string:filename>

Import the scene Render Settings from this .json template file before command line rendering.

-rsa <string:filename>

Use this flag when rendering with the Arnold for Maya renderer.

Import the AOVs from this .json template file before command line rendering. This is equivalent to performing File > Import Scene AOVs in the Render Setup editor, then batch rendering.

MEL callbacks

Flag Definition

-preRender <string>

MEL code executed before rendering.

-postRender <string>

MEL code executed after rendering.

-preLayer <string>

MEL code executed before each render layer.

-postLayer <string>

MEL code executed after each render layer.

-preFrame <string>

MEL code executed before each frame.

-postFrame <string>

MEL code executed after each frame.

-pre string

Obsolete flag.

-post string

Obsolete flag.