1
$\begingroup$

Is there a handler to execute a function after an OpenGL render (after the whole animation is rendered).

Because this script

import bpy

def end_rendering(dummy):
    print("I'm doing something")
    bpy.app.handlers.render_complete.remove(end_rendering)

bpy.app.handlers.render_complete.append(end_rendering)
bpy.ops.render.render('INVOKE_DEFAULT',animation=True)

works and prints I'm doing something after the animation is rendered, but this:

import bpy

def end_rendering(dummy):
    print("I'm doing something")
    bpy.app.handlers.render_complete.remove(end_rendering)

bpy.app.handlers.render_complete.append(end_rendering)
bpy.ops.render.opengl('INVOKE_DEFAULT',animation=True)

does nothing.

Is there a specific handler like "opengl_render_complete" or something? Anyway, is there a way to manage this and execute a function after an animation (called with 'INVOKE_DEFAULT') is rendered with opengl in python?

$\endgroup$
2
  • 1
    $\begingroup$ Can't find one, see yourself: docs.blender.org/api/current/… $\endgroup$
    – brockmann
    Commented Apr 16, 2020 at 11:18
  • $\begingroup$ Yeah, I checked it but I wander if there is another way to manage that. $\endgroup$
    – mugnozzo
    Commented Apr 19, 2020 at 6:43

0

You must log in to answer this question.

Browse other questions tagged .