[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44709] trunk/blender/source/blender/ windowmanager/intern/wm_files.c: running operators after loading a file in background mode would often fail because the screen was set to NULL and never assigned again (as it is when not in background mode),

Campbell Barton ideasman42 at gmail.com
Wed Mar 7 18:19:06 CET 2012


Revision: 44709
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44709
Author:   campbellbarton
Date:     2012-03-07 17:18:57 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
running operators after loading a file in background mode would often fail because the screen was set to NULL and never assigned again (as it is when not in background mode),

Now skip clearning the screen when in background mode.

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_files.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_files.c	2012-03-07 16:43:42 UTC (rev 44708)
+++ trunk/blender/source/blender/windowmanager/intern/wm_files.c	2012-03-07 17:18:57 UTC (rev 44709)
@@ -421,7 +421,12 @@
 		/* important to do before NULL'ing the context */
 		BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
 
-		CTX_wm_window_set(C, NULL); /* exits queues */
+		if (!G.background) {
+			/* in background mode this makes it hard to load
+			 * a blend file and do anything since the screen
+			 * won't be set to a valid value again */
+			CTX_wm_window_set(C, NULL); /* exits queues */
+		}
 
 #if 0
 		/* gives popups on windows but not linux, bug in report API




More information about the Bf-blender-cvs mailing list