17

I managed to compile Blender as a Python import module. When I do bpy.ops.render.render(write_still=True) it renders with cycles. How can I render by using Blender internal renderer instead?

ikel
  • 1,243
  • 2
  • 14
  • 19

1 Answers1

17

You can set the engine before rendering like this:

bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'

Its possible multiple scenes are involved in the render so you may want to do...

for scene in bpy.data.scenes:
    scene.render.engine = 'BLENDER_WORKBENCH'

Note: If you select the Scripting screen, then change the engine, the code to do this is printed at the top of the screen (called the Info view), eg:

bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'
bpy.context.scene.render.engine = 'CYCLES'
ideasman42
  • 47,387
  • 10
  • 141
  • 223
  • ! Thanks for the helpful hints about using a for loop to enforce all scene to be rendered by using Blender internal renderer. – ikel Dec 05 '13 at 11:07