Rendering all the scenes in a .blend

Hello all,

I’ve got a .blend with several scenes. All the scenes are set up to how I want them rendered, start & end frames etc, so is just a case of hitting ‘Animation’ for each scene. I’d like to know what python code I could use to go through all the scenes and render the animations out in a batch based on the render settings.

I found this on Creative Cow:

But it’s throwing up the error:

‘RenderSettings’ object has no attribute ‘RenderAnim’

I’ve also hovered over the Animation button to see that the Python script is render.render(animation=True), but this throws up: ‘RenderSettings’ object has no attribute ‘render’

I’m very interested in learning Python for use with Blender and so if someone could answer this question and also point me in the direction of some Python learning resources I would be very grateful :slight_smile:

This works in 2.61,
Pay to have a look at running blender in background mode.

import bpy

for scene in
    print("RENDERING SCENE: %s" %
    bpy.ops.render.render(animation=True, write_still=True, layer="",

Make sure you have a different output folder for each scene.

Hi batFinger,

I ended up having a python render line for each scene I had, but had to re-render some of them this morning and your script is working a treat (although I’ve changed ‘write_still=False’ as it’s animation).

I started Blender from the command line to run this script, so can see all the outputs in the Terminal. I’ll definitely look at running blender without the UI next time I have to batch process something though, thanks for the help & tip.

I’m trying to make use of a similar python script that will render out all scenes and save the output according to each scene’s render settings. I have a blender file with about 80 scenes. The original author of this post cited a link which accomplishes this but the API has changed. So like him, I also get “‘RenderSettings’ object has no attribute ‘RenderAnim’” when running the following code:

for s in

How can I accomplish this in Blender 2.76b?