Skip to main content
2 of 2
added 1 character in body
Martynas Žiemys
  • 28k
  • 2
  • 38
  • 81

You can use 'INVOKE_DEFAULT' to make Blender render as if you pressed F12:

bpy.ops.render.render('INVOKE_DEFAULT')

However, rendering from a script is very tricky, since rendering is multithreaded and even happens on multiple devices it is hard for the script to know when it's done so if you have some other stuff that happens after you start rendering, it may behave in unexpected ways. You need to somehow wait until the rendering is done.

See How to wait the finish of the bpy.ops.render.render('INVOKE_DEFAULT',animation=False, write_still=True)?

Martynas Žiemys
  • 28k
  • 2
  • 38
  • 81