From 26f9a9245387ced59214840f99ccf4aabc0c39f4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 1 Feb 2015 04:15:34 +1100 Subject: [PATCH] WM: empty menu so addons can extend the splash --- release/scripts/startup/bl_ui/space_userpref.py | 8 ++++++++ source/blender/windowmanager/intern/wm_operators.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 10394e50581..d8f7c4f4094 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -120,6 +120,14 @@ class USERPREF_MT_splash(Menu): row.menu("USERPREF_MT_appconfigs", text="Preset") +# only for addons +class USERPREF_MT_splash_footer(Menu): + bl_label = "" + + def draw(self, context): + pass + + class USERPREF_PT_interface(Panel): bl_space_type = 'USER_PREFERENCES' bl_label = "Interface" diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 631201befc4..aa3788bbc90 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2028,6 +2028,14 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiItemO(col, NULL, ICON_RECOVER_LAST, "WM_OT_recover_last_session"); uiItemL(col, "", ICON_NONE); + mt = WM_menutype_find("USERPREF_MT_splash_footer", false); + if (mt) { + Menu menu = {NULL}; + menu.layout = uiLayoutColumn(layout, false); + menu.type = mt; + mt->draw(C, &menu); + } + UI_block_bounds_set_centered(block, 0); return block;