Tagged: macintosh

Creating a Maya batch render script

Creating a Maya batch render script for a PC using Windows has always been straightforward in my experience. You simply write a text file with the following code:

render /path/to/myFile.mb

Make the file executable by changing the extension to .bat. Double click the file to launch the render.

The renderer will use settings that were selected when the project was saved. Those settings can be over-ridden with render flags. See Render Flags below for render flags and options.

For the Mac, it can be slightly less straightforward. Follow these instructions, found on Autodesk, The Area


You are on Mac OS X and you want to render several files one after another using a batch script.


To batch render multiple scene files, you need to create a shell script, for example: myRender.sh.

1. Using a text editor (Applications > Textedit), enter the render command for each individual scene on a separate line.

Render –r sw scene1.mb
Render –r sw scene2.mb
Render –r sw scene3.mb

In some cases, you may need to enter the complete path of the Render command. It is located here:

(of course, different for later versions of the software)

2. Save the file on your desktop as: myRender.sh.

3. You will need to change the file permissions of myRender.sh to 755.

Open the Maya Terminal (Applications > Autodesk > Maya2009 > Maya Terminal) and type:

chmod 755 /Users/YOUR-USERNAME/Desktop/myRender.sh

4. Now run the script from the Maya terminal by typing:


(note! A shortcut to typing file paths in the terminal: Just drag the file to the terminal window!)


#!/bin/bash /Applications/Autodesk/maya2009/Maya.app/Contents/bin/Render -rd /path/to/render/output/folder /path/to/myFile.mb

Render Flags

Render flags are “options” code. For example in Render -rd, -rd is the flag, which allows you to set the exact render directory, i.e. where your rendered images will be saved.

Render -rd /path/to/render/output/folder

Do a search in the help for more render flags (options):
render -h in the terminal.

/Applications/Autodesk/maya2009/Maya.app/Contents/bin/Render -h

Popular Render Flags:

#Use this flag to ensure you are rendering to the proper project: -proj /path/to/projectDirectory

-s, -e
#specify start and end frames: -s 0 -e 100

# Specify renderer: -r mr for mental ray (or : sw, hw, etc)

# Render threads, specify number of cpu threads, I use -rt 8 for my Mac Pro Quad (Mental Ray only)

# Specify render layer by name: -rl layer1

#Specify camera to render by name

# specify render image path: -rd /path/ to/image/folder/

# specify image name: -im myImageName

If you are using Render layers use the following flags and setup:

-rl boolean|name(s)

Set up like this:

Render -rl layer1 /path/to/file1.mb
Render -rl layer2 /path/to/file1.mb

More info on render flags:

Maya render flags: http://www.pdipierro.com/tutorials/MayaRenderFlags.html

Also see