Flags are available for use with the command line renderer that enable you to apply render setup templates, or import scene Render Settings or AOVs before batch rendering.
Flag short name | Flag long name | Description |
---|---|---|
-rsp <string:filename> | -rendersettingspreset <string:filename> | Import the scene Render Settings from this .json template file before command line rendering. This is equivalent to performing File > Import Scene Render Settings in the Render Setup editor, then batch rendering. |
-rsa <string:filename> | -rendersettingsaov <string:filename> | 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. |
-rst <string:filename> | -rendersetuptemplate <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. Note:
The .json created via Export All exports all Render Setup layers, collections and overrides, as well as the scene Render Settings and AOVs. Therefore, when you import this template using the flag -rst, the Render Settings and AOVs are also imported. To override these settings, use the -rsp and -rsa flags in conjunction with the -rst flag. This is most useful if you export your template from a scene with low quality Render Settings, and you wish to batch render with these render setup nodes, but with higher quality Render Settings. Use the -rst flag with the -rsp flag, and the Render Settings imported with the latter will take precedence over the Render Settings imported with the former. |
The flags can be used in conjunction with one another and with other existing render flags; for example, -rl.
If you explicitly declare a flag to set an attribute that exists in the json file, it is the flag you declare in the command line that takes precedence. For example, if you set the Image Size Width as 960 and Height as 540 in your Render Settings .json file, then type the following command:
"C:\Program Files\Autodesk\Maya<version>\bin\Render.exe" -r sw -x 480 -y 270 -rsp "C:\MyDocuments\MyPresets\MyRSPresets.json" <scene>
The batch render image size would be 480x270.
In Maya 2018, you can avoid typing the full path for your .json file by saving it to the Global Templates Location (for the -rst flag), or the Global Presets Location (for the -rsa and -rsp flags). For more information about these paths, see Location of template files and Location of preset files.
You can use a relative path to import a .json template or preset file saved in any of the following locations:
In the case where a .json file of the same name exists in more than one directory, Maya searches for the template in the order listed above. It is recommended, however, that your template filenames be unique.