File Browser UI: Add Select menu to File Browser

Adding this for consistency with other editors. Seems as if we never had this in the past.
This commit is contained in:
William Reynish 2019-09-04 22:09:01 +02:00
parent fc0b51d516
commit 5d442440f8
1 changed files with 18 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class FILEBROWSER_HT_header(Header):
layout.template_header()
layout.menu("FILEBROWSER_MT_view")
layout.menu("FILEBROWSER_MT_select")
# can be None when save/reload with a file selector open
@ -435,6 +436,22 @@ class FILEBROWSER_MT_view(Menu):
layout.menu("INFO_MT_area")
class FILEBROWSER_MT_select(Menu):
bl_label = "Select"
def draw(self, context):
layout = self.layout
st = context.space_data
layout.operator("file.select_all", text="All").action = 'SELECT'
layout.operator("file.select_all", text="None").action = 'DESELECT'
layout.operator("file.select_all", text="Inverse").action = 'INVERT'
layout.separator()
layout.operator("file.select_box")
class FILEBROWSER_MT_context_menu(Menu):
bl_label = "Files Context Menu"
@ -485,6 +502,7 @@ classes = (
FILEBROWSER_PT_directory_path,
FILEBROWSER_PT_options_toggle,
FILEBROWSER_MT_view,
FILEBROWSER_MT_select,
FILEBROWSER_MT_context_menu,
)