From 8971018eb64a68119687c74db875fd45f89cbdf8 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Tue, 16 Feb 2021 09:38:42 -0500 Subject: UI: Add support for bl_description for panels This commit adds support for `bl_description` and python docstrings for panels. This is useful for pop-over panel types so they can have a label and description. This commit also includes an example use case. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D10429 --- source/blender/editors/interface/interface_layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index fef243d7193..8f90dc7f801 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -3057,7 +3057,8 @@ void uiItemPopoverPanel_ptr( }; pt->draw_header(C, &panel); } - uiBut *but = ui_item_menu(layout, name, icon, ui_item_paneltype_func, pt, NULL, NULL, true); + uiBut *but = ui_item_menu( + layout, name, icon, ui_item_paneltype_func, pt, NULL, pt->description, true); but->type = UI_BTYPE_POPOVER; if (!ok) { but->flag |= UI_BUT_DISABLED; -- cgit v1.2.3