UI: Add "New" and "Open..." to the File Context Menu

Puts both operators at easy reach with the left hand since the
shortcuts for these are somewhat cumbersome (Ctrl+O/Ctrl+N)
This commit is contained in:
Pablo Vazquez 2018-07-25 11:56:37 +02:00
parent 509d87230a
commit ee9d375045
Notes: blender-bot 2023-03-24 17:05:22 +01:00
Referenced by issue #56178, Number of users for action datablock goes constantly up
1 changed files with 9 additions and 4 deletions

View File

@ -265,8 +265,8 @@ class INFO_MT_file(Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
layout.operator("wm.link", text="Link", icon='LINK_BLEND')
layout.operator("wm.append", text="Append", icon='APPEND_BLEND')
layout.operator("wm.link", text="Link...", icon='LINK_BLEND')
layout.operator("wm.append", text="Append...", icon='APPEND_BLEND')
layout.menu("INFO_MT_file_previews")
layout.separator()
@ -539,8 +539,13 @@ class TOPBAR_MT_file_specials(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_AREA'
layout.operator("wm.link", text="Link", icon='LINK_BLEND')
layout.operator("wm.append", text="Append", icon='APPEND_BLEND')
layout.operator("wm.read_homefile", text="New", icon='NEW')
layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
layout.separator()
layout.operator("wm.link", text="Link...", icon='LINK_BLEND')
layout.operator("wm.append", text="Append...", icon='APPEND_BLEND')
layout.separator()