1
$\begingroup$

i'm new to python, trying to write a little compositing and rendering addon. One of its fonction is to add a button with rendering a still and writing the render and all the file outputs renders in the render path (the f12 button of the regular GUI doesn't do that). So here's the operator looks like

#####################################################



# Add render still operator
def renderstill (context):
    bpy.context.scene.render.display_mode = 'WINDOW'
    bpy.ops.render.render(write_still=True, use_viewport=True)


class RenderStill(bpy.types.Operator):
    """Render Current Frame Still and write all Outputs\nWarning : Blender is going to freeze during the render"""
    bl_idname = "render.still_files"
    bl_label = "Render Current Frame Still"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        renderstill(context)
        return {'FINISHED'}


#####################################################

This works pretty good, but it freezes the gui. Is there a way to make this acts like a regular f12 render on the gui ? with tile viewing, progression bar... ? Thanks in advance !

$\endgroup$
3
  • 1
    $\begingroup$ Sadly, no. Python script disable UI interactions untill completion. $\endgroup$
    – Leander
    Jan 16, 2017 at 1:27
  • $\begingroup$ thanks for the quick reply ! oh ok... and is there a way to see the render progression through console window ? like with a "print" instruction ? $\endgroup$
    – tonton
    Jan 16, 2017 at 1:30
  • $\begingroup$ I can't comment yet, but check this related question. I had this problem these days. Fortunately you can do this in the operator with some little adjustments. blender.stackexchange.com/questions/71454 $\endgroup$
    – Chaos
    Jan 20, 2017 at 15:32

0