diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-14 13:05:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-14 13:05:00 +0300 |
commit | 0ee1cdab7e5896d56c7c6d9681a427e386fa2ae9 (patch) | |
tree | 46b13ef7a39b460863d6957723410de7c54621f9 /source/blender/windowmanager | |
parent | 4c5374d46ae1972840bd9ea2eb0f74352e2bc3f4 (diff) |
WM: Option to load startup w/o closing the splash
Not user visible, needed for switching templates.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 05d63869074..9e1a4e2e73f 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1426,7 +1426,16 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op) G.fileflags &= ~G_FILE_NO_UI; } - return wm_homefile_read(C, op->reports, from_memory, filepath) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; + if (wm_homefile_read(C, op->reports, from_memory, filepath)) { + /* Load a file but keep the splash open */ + if (RNA_boolean_get(op->ptr, "use_splash")) { + WM_init_splash(C); + } + return OPERATOR_FINISHED; + } + else { + return OPERATOR_CANCELLED; + } } void WM_OT_read_homefile(wmOperatorType *ot) @@ -1449,6 +1458,10 @@ void WM_OT_read_homefile(wmOperatorType *ot) "Load user interface setup from the .blend file"); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + /* So the splash can be kept open after loading a file (for templates). */ + prop = RNA_def_boolean(ot->srna, "use_splash", true, "Splash", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + /* omit poll to run in background mode */ } |