include menu ID's in tooltips when python tips are enabled, there was no way to find...
[blender.git] / source / blender / editors / interface / interface_regions.c
index 62043f240e453fb6c44b4e38578edbb196226cb8..9e7717260e6f50a7a39930d08b49a2ceee8b6b8d 100644 (file)
@@ -484,6 +484,17 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                        }
                }
        }
+       else if (ELEM(but->type, MENU, PULLDOWN)) {
+               if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
+                       if(but->menu_create_func && WM_menutype_contains((MenuType *)but->poin)) {
+                               MenuType *mt= (MenuType *)but->poin;
+                               BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", mt->idname);
+                               data->color[data->totline]= 0x888888;
+                               data->totline++;
+                       }
+               }
+
+       }
 
        assert(data->totline < MAX_TOOLTIP_LINES);