[Bf-python] Non-blocking OpenGL animation rendering.

Campbell Barton ideasman42 at gmail.com
Mon May 27 11:48:11 CEST 2013


No, there is no way to do this currently.

And running operators from a thread isnt supported (as you already found)

The reason is cycles and blender-internal make a copy of the data and
operate on it, where as opengl render is just rendering the viewport
to an offscreen buffer which makes it more tricky to do at the same
time as the user interacting with the same view -without getting into
problematic conflicts.

On Mon, May 27, 2013 at 7:32 PM, Adhi Hargo <cadmus.sw at gmail.com> wrote:
> Hi, everyone.
>
> I'm currently writing a custom preview render operator, internally
> calling bpy.ops.render.opengl(). The problem is, opengl() runs
> blocking (made the UI unresponsive) if called from another operator,
> though it isn't if called directly from GUI. I see that executing it
> runs the underlying C function, screen_render_exec, which is blocking.
>
> Is there any way to get non-blocking OpenGL render from Python code? I
> haven't found any addon/sample that does this. Tried using
> context.window_manager.invoke* functions, or running it in a separate
> thread, but they crash Blender. If all else fails, I may have to spawn
> new Blender process to do the job.
>
> Thank you in advance.
>
> --
> - Adhi Hargo
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python



-- 
- Campbell



More information about the Bf-python mailing list