From c46dcdf8871e7404516a234087cfc4bf4e2794d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 24 Mar 2020 11:34:18 +1100 Subject: 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. --- source/blender/makesrna/intern/rna_userdef.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesrna/intern/rna_userdef.c') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index f68c3c3bceb..f4bb2f8ef0f 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6051,6 +6051,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) prop, "Undo Speedup", "Use new undo speedup (WARNING: can lead to crashes and serious .blend file corruption)"); + + prop = RNA_def_property(srna, "use_menu_search", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "use_menu_search", 1); + RNA_def_property_ui_text(prop, "Menu Search", "Search actions by menus instead of operators"); } static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) -- cgit v1.2.3