UI: add menu search functionality to operator search menu

This has some advantages over operator search:

- Some operators need options set to be usefully accessed.
- Shows key bindings to access menus
  (for actions that don't have key bindings themselves).
- Non operator actions such as check-boxes are also shown.
- Menu items can control execution context, using invoke or execute
  where appropriate so we can control how the operator runs.

Part of the design task T74157.

This can be tested using the 'Experimental' preferences section
or selected in the key-map editor.
This commit is contained in:
2020-03-24 11:34:18 +11:00
parent 94b8166a8b
commit c46dcdf887
16 changed files with 828 additions and 72 deletions

View File

@@ -445,7 +445,7 @@ void ui_rna_collection_search_cb(const struct bContext *C,
/* add search items from temporary list */
for (cis = items_list->first; cis; cis = cis->next) {
if (UI_search_item_add(items, cis->name, cis->data, cis->iconid) == false) {
if (!UI_search_item_add(items, cis->name, cis->data, cis->iconid, 0)) {
break;
}
}