Created
March 25, 2023 21:24
-
-
Save CypherPoet/fbe12f099b83766b2efa2ad547f0aa25 to your computer and use it in GitHub Desktop.
Render all Frames in Blender Using Cycles and Open EXR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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