I have been attempting to create a simple add-on to assist non-3D colleagues.
Part of the plugin uses markers as filename during the render sequence.
Below is the code that I use to render and save the image.
bpy.ops.render.render('INVOKE_DEFAULT', write_still=True)
But 'INVOKE_DEFAULT' stops the for loop. If I remove the code I don't get to see the render progress.
Is there a solution to view the render progress and save the images?
Here is the section of the code I use render and save the images with the marker names.
def execute(self, context):
# get the scene
scn = bpy.context.scene
# get the output path
output_path = scn.render.filepath
# iterate through markers and render
for k, m in scn.timeline_markers.items():
frame = m.frame
marker_name = m.name
scn.frame_set(frame)
scn.render.filepath = os.path.join(output_path, marker_name + "." + scn.render.image_settings.file_format)
bpy.ops.render.render(write_still=True)
#reset the output path
scn.render.filepath = output_path
return {'FINISHED'}
scn.render.image_settings.file_format,jpgas it was, is just a placeholder and will be overwritten by the file format given in the ui anyway. Cheers! @Sharl – p2or Jan 31 '20 at 09:02