[Bf-blender-cvs] [1a21c0c239f] blender2.8: UI: show panel type in Python tooltips
Campbell Barton
noreply at git.blender.org
Wed Dec 19 11:50:09 CET 2018
Commit: 1a21c0c239fcaf8bf9570aa0bc22aa197e3edf94
Author: Campbell Barton
Date: Wed Dec 19 21:49:04 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB1a21c0c239fcaf8bf9570aa0bc22aa197e3edf94
UI: show panel type in Python tooltips
Handy when editing UI scripts.
===================================================================
M source/blender/editors/interface/interface.c
===================================================================
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index c63ffc87b8e..6dcee242f1e 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4765,8 +4765,15 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
tmp = BLI_strdup(but->optype->idname);
else if (ELEM(but->type, UI_BTYPE_MENU, UI_BTYPE_PULLDOWN)) {
MenuType *mt = UI_but_menutype_get(but);
- if (mt)
+ if (mt) {
tmp = BLI_strdup(mt->idname);
+ }
+ }
+ else if (but->type == UI_BTYPE_POPOVER) {
+ PanelType *pt = UI_but_paneltype_get(but);
+ if (pt) {
+ tmp = BLI_strdup(pt->idname);
+ }
}
}
else if (ELEM(type, BUT_GET_RNA_LABEL, BUT_GET_RNA_TIP)) {
More information about the Bf-blender-cvs
mailing list