Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Vazquez <contact@pablovazquez.art>2019-02-28 21:45:16 +0300
committerPablo Vazquez <contact@pablovazquez.art>2019-02-28 21:45:21 +0300
commit04baefcc2fc0d5ad7ebdd19f3668088e329c5f20 (patch)
treeeb140570959bc8618f2bc714eb5ddf9bfb2e1711 /release
parent775936f0b29e0ee4ee72ecf1bafe22686d06c86b (diff)
UI: File menu tweaks.
* Move Revert, Recover Last Session, Recover Auto Save to its own sub-menu. Had three entries of the same category, and solves user reports on "Revert" being dangerously accessible under Open. * Move up Link, Append, Import, Export as they are used more often than e.g. Save Startup File.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py56
1 files changed, 37 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index f0ff5e9a29d..aaf2f29a229 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -563,11 +563,12 @@ class TOPBAR_MT_file(Menu):
layout.operator_context = 'INVOKE_AREA'
layout.menu("TOPBAR_MT_file_new", text="New", icon='FILE_NEW')
+
+ layout.separator()
+
layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
layout.menu("TOPBAR_MT_file_open_recent")
- layout.operator("wm.revert_mainfile")
- layout.operator("wm.recover_last_session")
- layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
+ layout.menu("TOPBAR_MT_file_recover")
layout.separator()
@@ -580,6 +581,23 @@ class TOPBAR_MT_file(Menu):
layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
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.separator()
+
+ layout.menu("TOPBAR_MT_file_import", icon='IMPORT')
+ layout.menu("TOPBAR_MT_file_export", icon='EXPORT')
+
+ layout.separator()
+
+ layout.menu("TOPBAR_MT_file_external_data")
+ layout.menu("TOPBAR_MT_file_previews")
+
+ layout.separator()
+
layout.operator_context = 'INVOKE_AREA'
if any(bpy.utils.app_template_paths()):
@@ -604,22 +622,6 @@ class TOPBAR_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.menu("TOPBAR_MT_file_previews")
-
- layout.separator()
-
- layout.menu("TOPBAR_MT_file_import", icon='IMPORT')
- layout.menu("TOPBAR_MT_file_export", icon='EXPORT')
-
- layout.separator()
-
- layout.menu("TOPBAR_MT_file_external_data")
-
- layout.separator()
-
layout.operator_context = 'EXEC_AREA'
if bpy.data.is_dirty:
layout.operator_context = 'INVOKE_SCREEN' # quit dialog
@@ -688,6 +690,21 @@ class TOPBAR_MT_file_new(Menu):
TOPBAR_MT_file_new.draw_ex(self.layout, context)
+class TOPBAR_MT_file_recover(Menu):
+ bl_label = "Recover"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
+ layout.operator("wm.recover_last_session")
+
+ layout.separator()
+
+ layout.operator_context = 'INVOKE_AREA'
+ layout.operator("wm.revert_mainfile")
+
+
class TOPBAR_MT_templates_more(Menu):
bl_label = "Templates"
@@ -1046,6 +1063,7 @@ classes = (
TOPBAR_MT_editor_menus,
TOPBAR_MT_file,
TOPBAR_MT_file_new,
+ TOPBAR_MT_file_recover,
TOPBAR_MT_templates_more,
TOPBAR_MT_file_import,
TOPBAR_MT_file_export,