[Bf-blender-cvs] [26f9a92] master: WM: empty menu so addons can extend the splash

Campbell Barton noreply at git.blender.org
Sat Jan 31 18:20:19 CET 2015


Commit: 26f9a9245387ced59214840f99ccf4aabc0c39f4
Author: Campbell Barton
Date:   Sun Feb 1 04:15:34 2015 +1100
Branches: master
https://developer.blender.org/rB26f9a9245387ced59214840f99ccf4aabc0c39f4

WM: empty menu so addons can extend the splash

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 10394e5..d8f7c4f 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 631201b..aa3788b 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;




More information about the Bf-blender-cvs mailing list