[Bf-committers] Fix: Using Yafray for background rendering
Gregor Mückl
bf-committers@blender.org
Tue, 10 Aug 2004 17:46:27 +0200
--Boundary-00=_T3OGBODgeQUM0YP
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi!
I've attached a small fix to make blender load user preferences when it is
about to render in background. This is neccessary because the yafray exporter
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.
Regards,
Gregor
--Boundary-00=_T3OGBODgeQUM0YP
Content-Type: text/plain;
charset="us-ascii";
name="yafray-background.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="yafray-background.txt"
Index: blender/src/usiblender.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/usiblender.c,v
retrieving revision 1.55
diff -c -p -r1.55 usiblender.c
*** blender/src/usiblender.c 22 Jun 2004 12:59:53 -0000 1.55
--- blender/src/usiblender.c 10 Aug 2004 15:43:20 -0000
*************** int BIF_read_homefile(void)
*** 173,178 ****
--- 173,182 ----
BIF_InitTheme(); // sets default again
+ if(G.background) {
+ return;
+ }
+
if (success) {
mainwindow_set_filename_to_title(tstr);
countall();
Index: creator/creator.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/creator/creator.c,v
retrieving revision 1.41
diff -c -p -r1.41 creator.c
*** creator/creator.c 1 Aug 2004 22:28:56 -0000 1.41
--- creator/creator.c 10 Aug 2004 15:43:21 -0000
*************** int main(int argc, char **argv)
*** 459,464 ****
--- 459,465 ----
// audio = 0;
// sound_init_audio();
// if (G.f & G_DEBUG) printf("setting audio to: %d\n", audio);
+ BIF_read_homefile();
}
/**
--Boundary-00=_T3OGBODgeQUM0YP--