The purpose of this script is to automate the process of creating a custom render pass in Maya 2009.
For each material selected, this script will create a writeTo Node (either color, depth, label, or vector), and connect the outColor of the material to the evaluationPassThrough.
It will also change the Custom Pass field of the writeTo node to the pass you specify, and also connect a material that you specify to the color input.
In the case of the depth, label, and vector passes, it will connect the outValueR, as the input for these nodes only takes one connection.
I realise not all nodes you will be connecting to these buffers will use outValue, but this script was created primarily for color passes.
To run the script, source it, or type CustomPassCreator(); into the command line, or copy it to your shelf.
You need to have Maya 2009, and have mental ray enabled to use this script.
You should also first create your custom passes in the Passes tab of the render globals before running this script
Any suggestions or comments please feel free to contact me.