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:
By default, 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. You can workaround this issue by disabling the Export Render Settings and AOVs option in the File > Export All window. This exports a .json without the scene Render Settings and AOVs. This feature is most useful if you want to import a template to use its render setup layers, collections, and overrides, but without modifying the Render Settings or AOVs in the scene that you are importing into. Otherwise, if you are importing a .json that already includes the Render Settings and AOVs, you can override the Render Settings in that file by using 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. One sample application would be if the template is exported from a scene with low quality Render Settings, and you want to batch render with these render setup nodes, but with higher quality Render Settings. |
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.
You can avoid typing the full path to your .json by using a relative path to import a template or preset file saved in any of the following locations:
For more information about these paths, see Location of template files and Location of preset files.
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.