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.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
@@ -2158,16 +2158,6 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel):
|
||||
)
|
||||
"""
|
||||
|
||||
class USERPREF_PT_experimental_ui(ExperimentalPanel, Panel):
|
||||
bl_label = "UI"
|
||||
|
||||
def draw(self, context):
|
||||
self._draw_items(
|
||||
context, (
|
||||
({"property": "use_menu_search"}, "T74157"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
class USERPREF_PT_experimental_system(ExperimentalPanel, Panel):
|
||||
bl_label = "System"
|
||||
@@ -2270,7 +2260,6 @@ classes = (
|
||||
# Popovers.
|
||||
USERPREF_PT_ndof_settings,
|
||||
|
||||
USERPREF_PT_experimental_ui,
|
||||
USERPREF_PT_experimental_system,
|
||||
|
||||
# Add dynamically generated editor theme panels last,
|
||||
|
Reference in New Issue
Block a user