Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-03-07 21:18:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-07 21:18:57 +0400
commit8a06ee3d429beb66e0c5316d2702fb6bd0237a50 (patch)
tree49e7ebfcd54085c85ee34e8d54ca58dc723a2a77 /source/blender
parent5d74235b5fc0f73c4fe33ab28ac1f1b8753131ee (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index bae6c7abcda..edacb5a8071 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -421,7 +421,12 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
/* 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