diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 13:19:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-26 13:19:51 +0400 |
commit | 06ae122f604a00ebe57903439a2a0cedd0f3ffca (patch) | |
tree | f60aa309927c5f86a43ee1629dab0e01bd7685d9 /source/blender/windowmanager/intern/wm.c | |
parent | 7c9033d606a35dd4311e9f84b06b013e5cb7712a (diff) |
include menu ID's in tooltips when python tips are enabled, there was no way to find the ID of a menu which become annoying if you wanted to reference it from a script.
Diffstat (limited to 'source/blender/windowmanager/intern/wm.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index bcd5cf38f88..a535c0bc1f8 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -175,6 +175,12 @@ int WM_menutype_add(MenuType* mt) return 1; } +/* inefficient but only used for tooltip code */ +int WM_menutype_contains(MenuType* mt) +{ + return (mt != NULL && BLI_findindex(&menutypes, mt) != -1); +} + void WM_menutype_freelink(MenuType* mt) { BLI_freelinkN(&menutypes, mt); |