I am trying to batch render few sequence like 1 to 10 and then 30 to 50 but rendering stops after completing one sequence.
def execute(self, context): batcher = bpy.context.scene.batch_render sce = bpy.context.scene rd = sce.render batch_count = 0 for it in batcher.frame_ranges: batch_count += 1 print("***********") if (it.end_frame < it.start_frame): print("Skipped batch " + str(it.start_frame) + " - " + str(it.end_frame) + ": Start frame greater than end frame") continue sce.frame_start = it.start_frame sce.frame_end = it.end_frame sce.render.filepath = it.filepath bpy.ops.render.render('INVOKE_DEFAULT',animation = True) sum = 0 for it in batcher.frame_ranges: if (it.end_frame >= it.start_frame): sum += (it.end_frame - it.start_frame) print("Rendered " + str(len(batcher.frame_ranges)) + " batches containing " + str(sum) + " frames") return {'FINISHED'} if I put this line:
bpy.ops.render.render('INVOKE_DEFAULT',animation = True) then it renders only one batch
if I put this line :
bpy.ops.render.render(animation = True) it renders all batch without any issue .. but it freeze blender and doesn't show render progress bar.
I want to see progress bar and do batch rendering.