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>2010-11-24 17:40:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-24 17:40:03 +0300
commit7c7307edbfc52f38559ad883c50eec967fe7872c (patch)
tree080fcb0102e109997a3308dc6a19e324adc8af61 /source/creator
parentc19dd6a7b2e7c1324e648206b88940bb3d408a9b (diff)
add a window manager to files loaded from 2.4x in background mode. (partial fix for [#24882]).
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 11715289a82..966a36d5625 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -907,6 +907,16 @@ static int load_file(int UNUSED(argc), char **argv, void *data)
pointcache works */
if (retval!=0) {
wmWindowManager *wm= CTX_wm_manager(C);
+
+ /* special case, 2.4x files */
+ if(wm==NULL && CTX_data_main(C)->wm.first==NULL) {
+ extern void wm_add_default(bContext *C);
+
+ /* wm_add_default() needs the screen to be set. */
+ CTX_wm_screen_set(C, CTX_data_main(C)->screen.first);
+ wm_add_default(C);
+ }
+
CTX_wm_manager_set(C, NULL); /* remove wm to force check */
WM_check(C);
G.relbase_valid = 1;