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>2018-11-30 05:33:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-30 05:33:13 +0300
commit7e21c99d05066a8f88453016c2f69a0607b5c2e0 (patch)
treec76a0a31d0f07d282aa17bbcdd6d3c4ebb2cc3e3 /source/blender/windowmanager/intern/wm_init_exit.c
parentdc312609dd346e40f106976fe1ac5d9ad99e8c20 (diff)
PyAPI: add load_factory_startup_post handler
Needed so we can apply changes to the startup file, only in the case when it's load loaded from a user-saved startup.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 9fca91d2f3f..e4ae9495c61 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -255,7 +255,10 @@ void WM_init(bContext *C, int argc, const char **argv)
WM_msgbus_types_init();
/* get the default database, plus a wm */
- wm_homefile_read(C, NULL, G.factory_startup, false, true, NULL, WM_init_state_app_template_get());
+ bool is_factory_startup = true;
+ wm_homefile_read(
+ C, NULL, G.factory_startup, false, true, NULL, WM_init_state_app_template_get(),
+ &is_factory_startup);
/* Call again to set from userpreferences... */
BLT_lang_set(NULL);
@@ -336,6 +339,9 @@ void WM_init(bContext *C, int argc, const char **argv)
BLI_callback_exec(bmain, NULL, BLI_CB_EVT_VERSION_UPDATE);
BLI_callback_exec(bmain, NULL, BLI_CB_EVT_LOAD_POST);
+ if (is_factory_startup) {
+ BLI_callback_exec(bmain, NULL, BLI_CB_EVT_LOAD_FACTORY_STARTUP_POST);
+ }
wm_file_read_report(C, bmain);