Would you happen to know how much effort it would take to code this type of options for rendering frames in Blender:
Frame List Formatting Options
So, in a single line like this:
Blender would render every 10th frame between 1 to 100, then every 5th frame, then
every 2nd frame, then fill in the rest.
That way you could immediately see the whole sequence you’re rendering, and spot stuff that needs to be fixed very early on.
I made a script. It’s a bit rough but does the job.
# Render frames in specified order.
# frame_order, formatting:
# 30-120x3 means render every 3rd frame between frames 30-120
# 20-150 means render every frame in range 20-150
# 43 means render frame 43
# "1, 50, 100, 50-100x6, 1-100x3, 1-50" means
# first render frames 1, 50, 100, then every 6th frame between 50-100,
# then every 3rd frame between 1-100, and then all between 1-50.
# render_all - True: render all frames between start and end frames
# False: only render frames specified in formatting,
# still limited by start and end frames
frame_order = "1, 50, 100, 50-100x6, 1-100x3, 1-50"
render_all = True
import bpy, re, os
# Add full range of frames at the end.
frame_order = frame_order + "," + str(bpy.context.scene.frame_start) + "-" + str(bpy.context.scene.frame_end)
# clean and split to list of instructions
frame_order = frame_order.replace(" ", "")
frame_order = frame_order.split(",")
cmds = list()
# split to values and separators
for i in range(0, len(frame_order)):
cmds.append([x for x in re.split(r'(\d+)',frame_order[i]) if x])
frames = list()
# 3 allowed types: frame range with steps, frame range, frame
# Flood frames list with frames, duplicates will be skipped anyway
for i in range(0, len(cmds)):
if((len(cmds[i]) == 5) and (cmds[i] == "-") and (cmds[i] == "x")):
frames.extend([x for x in range(int(cmds[i]), int(cmds[i]), int(cmds[i]))])
elif((len(cmds[i]) == 3) and (cmds[i] == "-")):
frames.extend([x for x in range(int(cmds[i]), int(cmds[i])+1)])
elif((len(cmds[i]) == 1) and (cmds[i].isnumeric())):
Invalid frame order syntax")
# Amount of digits in maximum frame. Used for 0 padding
digits = len(str(max(frames)))
outputpath = bpy.context.scene.render.filepath
for i in range(0, len(frames)):
bpy.context.scene.frame_current = frames[i]
out = outputpath + str(frames[i]).zfill(digits)
out = out + bpy.context.scene.render.file_extension
if((os.path.isfile(out) == False) and frames[i] >= bpy.context.scene.frame_start and (frames[i] <= bpy.context.scene.frame_end)):
bpy.context.scene.render.filepath = outputpath + str(frames[i]).zfill(digits)
bpy.context.scene.render.filepath = outputpath
- Set render properties as usual. Dimensions, frame range, output path with or without filename (no #'s) and file format
- Open script in Blender text editor, set frame_order and render_all variables
- Save your .blend file and images/other unsaved external files that need to be saved separately
- Make sure you saved your files
- Run script (alt+P) to render in specified order
Works like a dream!
I’ll save this to my startup.blend to be available for my every single animation project from now on
Thank you very very much
I hope this will be implemented in the future releases of Blender