[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41898] trunk/blender/source/creator/ creator.c: Fix #29232: on background render where it could not find the . blend file, the

Brecht Van Lommel brechtvanlommel at pandora.be
Wed Nov 16 00:03:36 CET 2011


Revision: 41898
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41898
Author:   blendix
Date:     2011-11-15 23:03:35 +0000 (Tue, 15 Nov 2011)
Log Message:
-----------
Fix #29232: on background render where it could not find the .blend file, the
default cube would be rendered instead, now stops processing arguments after
failed file load.

Modified Paths:
--------------
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c	2011-11-15 22:09:30 UTC (rev 41897)
+++ trunk/blender/source/creator/creator.c	2011-11-15 23:03:35 UTC (rev 41898)
@@ -437,7 +437,7 @@
 	int stax, stay, sizx, sizy;
 
 	if (argc < 5) {
-		printf ("-p requires four arguments\n");
+		fprintf (stderr, "-p requires four arguments\n");
 		exit(1);
 	}
 
@@ -515,7 +515,7 @@
 static int set_audio(int argc, const char **argv, void *UNUSED(data))
 {
 	if (argc < 1) {
-		printf("-setaudio require one argument\n");
+		fprintf(stderr, "-setaudio require one argument\n");
 		exit(1);
 	}
 
@@ -977,6 +977,10 @@
 
 			DAG_on_visible_update(CTX_data_main(C), TRUE);
 		}
+		else {
+			/* failed to load file, stop processing arguments */
+			return -1;
+		}
 
 		/* WM_read_file() runs normally but since we're in background mode do here */
 #ifdef WITH_PYTHON




More information about the Bf-blender-cvs mailing list