Recently I have been working on some product renderings that involve lots of different shader and studio setups for the same objects. Basically every object has multiple colour combinations eg. white-white, white-blue, white-red, blue-white and so on. Also different colours needed different lighting setups to look correctly in the renderings. So a friend (we work together on this project) suggested that maybe we should have some kind of automation for that.
We ended up with having an Excel (CSV) list of all the required setup combinations. Each row represents one rendering scenario and the columns go as follows:
Some extra setup can be done at the top of the script itself. You can set variables such as setup file name, output directory (both relative to the current Blender file), objects collection name and finally studios collection name.
The Blender file has to be ordered accordingly to the above. So every rendered object should be exactly one Blender object (multiple materials possible) - they should be grouped in an 'Objects' collection. Each studio setup including light objects, backdrops, soft-boxes etc. should be a separate collection (so it can consist of multiple Blender objects). All those studio sub-collections should be grouped in a 'Studios' main collection. All the additional objects like cameras or things that should be always present can be located in a separate top-level collection.
That's it. I did not mean to create a completely universal batch script. For now it suits my needs, maybe will be useful for someone.
I have been running it on the current Blender version 2.92