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>2015-11-20 01:35:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-20 01:35:37 +0300
commitd96ffde491e5031b3e2e62cf0557922a16b40802 (patch)
tree33824e12a324a81607e1dbeaaaf7486c5bf14286 /source/creator
parent86cb772eb7d15358f3211a2801b9a72da103b5e5 (diff)
Fix switching scenes w/ background render
Caused by own de-duplication, b3492978 Scene switching relies on the window context being cleared.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 837011b9e97..c6203b6fd40 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -1498,7 +1498,13 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
success = WM_file_read(C, filename, &reports);
BKE_reports_clear(&reports);
- if (success == false) {
+ if (success) {
+ if (G.background) {
+ /* ensuer we use 'C->data.scene' for background render */
+ CTX_wm_window_set(C, NULL);
+ }
+ }
+ else {
/* failed to load file, stop processing arguments */
if (G.background) {
/* Set is_break if running in the background mode so