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

Simon Jagoe simon.jagoe at pragmagility.com
Mon Aug 9 13:03:57 CEST 2010


Thanks, Campbell. 

I have logged bug #23244 at https://projects.blender.org/tracker/?func=detail&aid=23244&group_id=9&atid=498


I'll look into your suggestion of rendering an animation with only one frame. At the moment my workaround has been to restart my Blender DBus service after a render to avoid the deadlock. So far that has been good enough for my purposes, but it is a bit of a nasty hack.

----- Original Message -----
From: "Campbell Barton" <ideasman42 at gmail.com>
To: "Blender Foundation Python list" <bf-python at blender.org>
Sent: Monday, 9 August, 2010 11:45:04 GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [Bf-python] Rendering from scripts (Blender 2.53)

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
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list