[Bf-python] Rendering from scripts (Blender 2.53)

Simon Jagoe simon.jagoe at pragmagility.com
Sat Aug 7 09:53:31 CEST 2010


Hi all,

I am working on a Blender (2.53, SVN r31098) script that is intended
to be a long-running process, listening for commands and manipulating
a .blend file based on these commands. I have a problem when it comes
to making this long-running Blender process render the scene and save
the output.

I am able to render and save the output once, but Blender then stops
responding to any further commands. I have a stripped down example of
this (with all IPC removed).

First, can somebody tell me how I should be rendering from a script?
What I am doing at the moment is this:
 >>> bpy.ops.render.render()
 >>> bpy.data.images['Render Result'].save_render(filepath=output)

Attached is a simple script that reproduces the problem. In my test, I
was running the script against the default scene. As soon as I try to
do the second render in the attached example, Blender freezes and I
never get the second render.

So far this is the only way I have found to di this. Any help would be
greatly appreciated.

Thanks,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: render_problem.py
Type: text/x-python
Size: 446 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20100807/aeaa70ed/attachment.py>


More information about the Bf-python mailing list