diff options
-rw-r--r-- | source/creator/creator.c | 8 |
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 |