Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-04 22:22:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-04 22:22:41 +0400
commit302856f4b16896d19e2adf6bd42823a88684fd4a (patch)
treee3fc6de26115673d8568f3ef5b4325dd2e600db7 /source/blender/editors
parent77fdf426d60e7461cbb6450d712ed6bf8e7fba09 (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')
-rw-r--r--source/blender/editors/include/UI_interface.h1
-rw-r--r--source/blender/editors/interface/interface_templates.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 12db9b93772..2dc552d0fce 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -817,6 +817,7 @@ void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *pt
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, int color_management);
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
+void uiOperatorSearch_But(uiBut *but);
void uiTemplateOperatorSearch(uiLayout *layout);
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
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 **************************/