Skip to content

Instantly share code, notes, and snippets.

@CypherPoet
Created March 25, 2023 21:24
Show Gist options
  • Save CypherPoet/fbe12f099b83766b2efa2ad547f0aa25 to your computer and use it in GitHub Desktop.
Save CypherPoet/fbe12f099b83766b2efa2ad547f0aa25 to your computer and use it in GitHub Desktop.
Render all Frames in Blender Using Cycles and Open EXR
import bpy
# Set the render settings
bpy.context.scene.render.engine = 'CYCLES' # Set the render engine to Cycles
bpy.context.scene.render.image_settings.file_format = 'OPEN_EXR' # Set the output format to OpenEXR
# Loop through all frames in the scene and render each one
for frame in range(bpy.context.scene.frame_start, bpy.context.scene.frame_end + 1):
bpy.context.scene.frame_set(frame)
# Set the output filename to "frame_0001.exr", "frame_0002.exr", etc.
file_path = "//render/frame_{:04d}.exr".format(frame)
# Set the output path to the filename for the current frame
bpy.context.scene.render.filepath = file_path
bpy.ops.render.render(write_still=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment