From d96ffde491e5031b3e2e62cf0557922a16b40802 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 20 Nov 2015 09:35:37 +1100 Subject: Fix switching scenes w/ background render Caused by own de-duplication, b3492978 Scene switching relies on the window context being cleared. --- source/creator/creator.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/creator') 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 -- cgit v1.2.3