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

Campbell Barton ideasman42 at gmail.com
Mon Aug 9 11:45:04 CEST 2010


Hi Simon, good find, its hanging because of this line in pipeline.c ~1280

	/* if preview render, we try to keep old result */
	BLI_rw_mutex_lock(&re->resultmutex, THREAD_LOCK_WRITE);

Would need to look further into whats calling BLI_rw_mutex_lock(...),
Could you report this to the blender bug tracker, so I can look into
it when I get time or someone else can too.

To workaround the problem you can set the start/end frames to be the
same and render an animation, this is what I used to do in 2.4x,
possibly it wont hang in that case though I didnt try it.

On Mon, Aug 9, 2010 at 6:51 PM, Simon Jagoe
<simon.jagoe at pragmagility.com> wrote:
> Hi all,
>
> I realised that there was a bit of extra junk in the script I attached to me previous message. Below is what I intended to send.
>
> ---------
>
> import bpy
>
> print('First render')
> output_path = '1.png'
> bpy.ops.render.render()
> bpy.data.images['Render Result'].save_render(filepath=output_path)
> print('Saved rendered image')
>
> print('Second render')
> output_path = '2.png'
> bpy.ops.render.render()
> bpy.data.images['Render Result'].save_render(filepath=output_path)
> print('Saved rendered image')
>
> _______________________________________________
> 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