diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-28 10:36:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-28 10:36:09 +0400 |
commit | ed99c94bef1dc896a645d5b361964afa7372365b (patch) | |
tree | 20a1231e82a9e94f60392d2ed9d3e8ace82760d9 /source/blender | |
parent | ebc538c56ce6f4a1c38721e833a95ed2ac900ca5 (diff) |
fix [#34636] bpy.app.handlers.load_post not run on startup file loading after splashscreen
Diffstat (limited to 'source/blender')
-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..67b0f920662 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 callbacks. */ + BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST); + } } void WM_init_splash(bContext *C) |