[Bf-blender-cvs] [d96ffde] master: Fix switching scenes w/ background render
Campbell Barton
noreply at git.blender.org
Thu Nov 19 23:47:06 CET 2015
Commit: d96ffde491e5031b3e2e62cf0557922a16b40802
Author: Campbell Barton
Date: Fri Nov 20 09:35:37 2015 +1100
Branches: master
https://developer.blender.org/rBd96ffde491e5031b3e2e62cf0557922a16b40802
Fix switching scenes w/ background render
Caused by own de-duplication, b3492978
Scene switching relies on the window context being cleared.
===================================================================
M source/creator/creator.c
===================================================================
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 837011b..c6203b6 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
More information about the Bf-blender-cvs
mailing list