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>2014-07-01 12:51:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-01 12:58:41 +0400
commitfe9110edc4d0f49b7dd8941409e8d63743942ea6 (patch)
tree5ea0e86a6aaa9ec62aac273cdf65d55cbf3a2ca0 /source/blender/blenkernel/intern/blender.c
parent2575be541bb66a5fa734bbf285237c849ea6523b (diff)
Code cleanup: use scene variable rather then calling CTX_data_scene
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 8afd2c458cd..9be9db77d39 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -286,6 +286,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
CTX_wm_area_set(C, NULL);
CTX_wm_region_set(C, NULL);
CTX_wm_menu_set(C, NULL);
+ curscene = bfd->curscene;
}
/* this can happen when active scene was lib-linked, and doesn't exist anymore */
@@ -299,6 +300,9 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
curscene = CTX_data_scene(C);
}
+ BLI_assert(curscene == CTX_data_scene(C));
+
+
/* special cases, override loaded flags: */
if (G.f != bfd->globalf) {
const int flags_keep = (G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF);
@@ -349,12 +353,12 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
for (win = wm->windows.first; win; win = win->next) {
if (win->screen && win->screen->scene) /* zealous check... */
- if (win->screen->scene != CTX_data_scene(C))
+ if (win->screen->scene != curscene)
BKE_scene_set_background(G.main, win->screen->scene);
}
}
}
- BKE_scene_set_background(G.main, CTX_data_scene(C));
+ BKE_scene_set_background(G.main, curscene);
if (mode != LOAD_UNDO) {
IMB_colormanagement_check_file_config(G.main);