diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 532404cf218..193af2f92c6 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -47,6 +47,7 @@ #include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" +#include "BLI_callbacks.h" #include "BLI_listbase.h" #include "BLI_path_util.h" #include "BLI_string.h" @@ -220,8 +221,17 @@ void WM_init(bContext *C, int argc, const char **argv) #endif /* load last session, uses regular file reading so it has to be in end (after init py etc) */ - if (U.uiflag2 & USER_KEEP_SESSION) + if (U.uiflag2 & USER_KEEP_SESSION) { wm_recover_last_session(C, NULL); + } + else { + /* normally 'wm_homefile_read' will do this, + * however python is not initialized when called from this function. + * + * unlikey any handlers are set but its possible, + * note that recovering the last session does its own callbacks. */ + BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST); + } } void WM_init_splash(bContext *C) |