Keymap: Use F4 for file context menu

- Replace Window context menu with File menu.

  This was recently removed however artists in the studio use
  link/append often.

- Add preferences to this menu so `F4, PKey` can still be used as a
  quick way to access preferences.
This commit is contained in:
Campbell Barton 2019-03-21 22:58:42 +11:00
parent 75b14db6a9
commit bd1299f6a4
Notes: blender-bot 2023-02-14 03:44:41 +01:00
Referenced by issue #61480, Add rename popup in the 3D View to replace the old Item panel
2 changed files with 1 additions and 27 deletions

View File

@ -349,7 +349,7 @@ def km_window(params):
("wm.doc_view_manual_ui_context", {"type": 'F1', "value": 'PRESS'}, None),
op_panel("TOPBAR_PT_name", {"type": 'F2', "value": 'PRESS'}, [("keep_open", False)]),
("wm.search_menu", {"type": 'F3', "value": 'PRESS'}, None),
op_menu("TOPBAR_MT_window_context_menu", {"type": 'F4', "value": 'PRESS'}),
op_menu("TOPBAR_MT_file_context_menu", {"type": 'F4', "value": 'PRESS'}),
])
if params.spacebar_action == 'TOOL':

View File

@ -962,31 +962,6 @@ class TOPBAR_MT_file_context_menu(Menu):
layout.menu("TOPBAR_MT_file_import", icon='IMPORT')
layout.menu("TOPBAR_MT_file_export", icon='EXPORT')
class TOPBAR_MT_window_context_menu(Menu):
bl_label = "Window Context Menu"
def draw(self, context):
layout = self.layout
layout.operator_context = 'EXEC_AREA'
layout.operator("wm.window_new")
layout.operator("wm.window_new_main")
layout.operator_context = 'INVOKE_AREA'
layout.operator("screen.area_dupli", icon='DUPLICATE')
layout.separator()
layout.operator("screen.area_split", text="Horizontal Split").direction = 'HORIZONTAL'
layout.operator("screen.area_split", text="Vertical Split").direction = 'VERTICAL'
layout.separator()
layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
layout.separator()
layout.operator("screen.userpref_show", text="Preferences...", icon='PREFERENCES')
@ -1146,7 +1121,6 @@ classes = (
TOPBAR_HT_upper_bar,
TOPBAR_HT_lower_bar,
TOPBAR_MT_file_context_menu,
TOPBAR_MT_window_context_menu,
TOPBAR_MT_workspace_menu,
TOPBAR_MT_editor_menus,
TOPBAR_MT_file,