diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-15 17:32:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-15 17:32:30 +0300 |
commit | debd8aab4a82d221b9b2207a2fd7a25bb34a1c16 (patch) | |
tree | fd6a7343a335602ef8f1db03d24fbc02717a16a2 /release/scripts/startup/bl_ui/space_topbar.py | |
parent | f83ccbc673dee2a23a2d26e8efb1dae233db48b2 (diff) |
UI: default to searching menus instead of operators
Menus from the top-bar, space-header and key bindings are used
to gather menus to populate the search popup.
Giving better context and default options for operators.
Part of T74157
Enabling "Developer Extras" exposes operator search in the Edit menu,
as this can be useful for developers to run operators
without first exposing them in the interface.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 1e6f03c2b0c..7a23eb9282c 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -580,6 +580,8 @@ class TOPBAR_MT_edit(Menu): def draw(self, context): layout = self.layout + show_developer = context.preferences.view.show_developer_ui + layout.operator("ed.undo") layout.operator("ed.redo") @@ -598,8 +600,9 @@ class TOPBAR_MT_edit(Menu): layout.separator() - layout.operator("wm.search_menu", - text="Operator Search...", icon='VIEWZOOM') + layout.operator("wm.search_menu", text="Menu Search...", icon='VIEWZOOM') + if show_developer: + layout.operator("wm.search_operator", text="Operator Search...", icon='VIEWZOOM') layout.separator() |