diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-04 22:22:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-04 22:22:41 +0400 |
commit | 302856f4b16896d19e2adf6bd42823a88684fd4a (patch) | |
tree | e3fc6de26115673d8568f3ef5b4325dd2e600db7 /source/blender/editors/interface | |
parent | 77fdf426d60e7461cbb6450d712ed6bf8e7fba09 (diff) |
operator spacebar search menu wasn't ignoring internal operators,
turns out there were copy-pasted functions for operator search popups which were identical except that one skipped internal ops.
de-duplicate so both work the same now.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 19d4de8bce4..f7a53c6bab2 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2785,6 +2785,9 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { wmOperatorType *ot = BLI_ghashIterator_getValue(iter); + if ((ot->flag & OPTYPE_INTERNAL) && (G.debug & G_DEBUG_WM) == 0) + continue; + if (BLI_strcasestr(ot->name, str)) { if (WM_operator_poll((bContext *)C, ot)) { char name[256]; @@ -2810,6 +2813,11 @@ static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char BLI_ghashIterator_free(iter); } +void uiOperatorSearch_But(uiBut *but) +{ + uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL); +} + void uiTemplateOperatorSearch(uiLayout *layout) { uiBlock *block; @@ -2820,7 +2828,7 @@ void uiTemplateOperatorSearch(uiLayout *layout) uiBlockSetCurLayout(block, layout); but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X * 6, UI_UNIT_Y, 0, 0, ""); - uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL); + uiOperatorSearch_But(but); } /************************* Running Jobs Template **************************/ |