Fix switching scenes w/ background render

Caused by own de-duplication, b3492978

Scene switching relies on the window context being cleared.
This commit is contained in:
2015-11-20 09:35:37 +11:00
parent 86cb772eb7
commit d96ffde491

View File

@@ -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