WM: empty menu so addons can extend the splash
This commit is contained in:
@@ -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"
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user