[Bf-blender-cvs] [c1ec6f00f27] master: UI: Move Recover operators into own menu under File.

Pablo Vazquez noreply at git.blender.org
Thu May 16 16:56:08 CEST 2019


Commit: c1ec6f00f278d823a7208c4cc3e44f58e20455a3
Author: Pablo Vazquez
Date:   Thu May 16 16:55:56 2019 +0200
Branches: master
https://developer.blender.org/rBc1ec6f00f278d823a7208c4cc3e44f58e20455a3

UI: Move Recover operators into own menu under File.

===================================================================

M	release/scripts/startup/bl_ui/space_topbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index dfd99b1f17b..2f23cf33aa2 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -234,8 +234,7 @@ class TOPBAR_MT_file(Menu):
         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()
 
@@ -329,6 +328,16 @@ 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_last_session", text="Last Session")
+        layout.operator("wm.recover_auto_save", text="Auto Save...")
+
+
 class TOPBAR_MT_app_about(Menu):
     bl_label = "About"
 
@@ -762,6 +771,7 @@ classes = (
     TOPBAR_MT_app_support,
     TOPBAR_MT_file,
     TOPBAR_MT_file_new,
+    TOPBAR_MT_file_recover,
     TOPBAR_MT_templates_more,
     TOPBAR_MT_file_import,
     TOPBAR_MT_file_export,



More information about the Bf-blender-cvs mailing list