I want to make a script that automatically bakes out several passes to several different images. In the standard baking setup, it bakes to the image you have in a texture node in your material. This gets strange when you have multiple image nodes. In my material I have a Diffuse, Gloss, AO, Normals, etc each as separate images. I want to bake each pass to the appropriate texture.
Is there a way to do this?