[Bf-committers] Fix: Using Yafray for background rendering

Wouter van Heyst bf-committers@blender.org
Wed, 11 Aug 2004 12:06:57 +0200

On Tue, Aug 10, 2004 at 05:46:27PM +0200, Gregor M=C3=BCckl wrote:
> Hi!
> I've attached a small fix to make blender load user preferences when it i=
> about to render in background. This is neccessary because the yafray expo=
> relies on the yfexportdir to be set and this path is stored in the user=
> prefs. Without this patch blender just aborts background rendering at the=
> moment.

As Gregor said on irc, it's a bit of a hack. Ultimately, the code would
be factored so that BIF_read_homefile() doesn't do any UI stuff and it
can be safely called from the background code.=20
Since this patch does fix a crash with the current code (and the
surrounding code isn't as clean as possible at the moment either), I'm
inclined to commit it, with the addition of a comment summing up the

Ton, do you agree reading the preferences makes sense while
backgrounded? As far as I can see there are no dangerous side effects,
but someone who knows the code better should comment.