diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-02-16 17:38:42 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2021-02-16 17:51:37 +0300 |
commit | 8971018eb64a68119687c74db875fd45f89cbdf8 (patch) | |
tree | 8f960e3eaa76edffe279322d4a9e8b0e5497d212 /source/blender/editors/interface/interface_layout.c | |
parent | e81fca1ed38ea447a1023dae3841f8980def28e4 (diff) |
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
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |