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:
authorHarley Acheson <harley.acheson@gmail.com>2020-05-13 00:28:32 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-05-13 00:29:59 +0300
commit5b86fe6f33505bcea7c81021506eb538908c245d (patch)
tree60976923749e642aad821a6cc1ef0dac5062c303 /release
parent613715a994ab6d7ceeaf4c5005057f7ba6f530d1 (diff)
UI: About Blender Dialog
Adds an 'About Blender' dialog to the 'App' menu to display information like branch and hash. Differential Revision: https://developer.blender.org/D7146 Reviewed by Campbell Barton
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/wm.py31
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py50
2 files changed, 32 insertions, 49 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 9e2ce8b83ad..b54ae67a9c5 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2557,6 +2557,36 @@ class WM_MT_splash(Menu):
layout.separator()
+class WM_MT_splash_about(Menu):
+ bl_label = "About"
+
+ def draw(self, context):
+
+ layout = self.layout
+ layout.operator_context = 'EXEC_DEFAULT'
+
+ layout.label(text="Blender is free software")
+ layout.label(text="Licensed under the GNU General Public License")
+ layout.separator()
+ layout.separator()
+
+ split = layout.split()
+ split.emboss = 'PULLDOWN_MENU'
+ split.scale_y = 1.3
+
+ col1 = split.column()
+
+ col1.operator("wm.url_open_preset", text="Release Notes", icon='URL').type = 'RELEASE_NOTES'
+ col1.operator("wm.url_open_preset", text="Credits", icon='URL').type = 'CREDITS'
+ col1.operator("wm.url_open", text="License", icon='URL').url = "https://www.blender.org/about/license/"
+
+ col2 = split.column()
+
+ col2.operator("wm.url_open_preset", text="Blender Website", icon='URL').type = 'BLENDER'
+ col2.operator("wm.url_open", text="Blender Store", icon='URL').url = "https://store.blender.org"
+ col2.operator("wm.url_open_preset", text="Development Fund", icon='FUND').type = 'FUND'
+
+
class WM_OT_drop_blend_file(Operator):
bl_idname = "wm.drop_blend_file"
bl_label = "Handle dropped .blend file"
@@ -2626,4 +2656,5 @@ classes = (
BatchRenameAction,
WM_OT_batch_rename,
WM_MT_splash,
+ WM_MT_splash_about,
)
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 7a23eb9282c..9aedd7ef0b3 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -229,14 +229,7 @@ class TOPBAR_MT_app(Menu):
layout = self.layout
layout.operator("wm.splash")
-
- layout.separator()
-
- layout.menu("TOPBAR_MT_app_support")
-
- layout.separator()
-
- layout.menu("TOPBAR_MT_app_about")
+ layout.operator("wm.splash_about")
layout.separator()
@@ -407,45 +400,6 @@ class TOPBAR_MT_file_defaults(Menu):
props.app_template = app_template
-class TOPBAR_MT_app_about(Menu):
- bl_label = "About"
-
- def draw(self, _context):
- layout = self.layout
-
- layout.operator("wm.url_open_preset", text="Release Notes",
- icon='URL').type = 'RELEASE_NOTES'
-
- layout.separator()
-
- layout.operator("wm.url_open_preset",
- text="Blender Website", icon='URL').type = 'BLENDER'
- layout.operator("wm.url_open_preset", text="Credits",
- icon='URL').type = 'CREDITS'
-
- layout.separator()
-
- layout.operator(
- "wm.url_open", text="License", icon='URL',
- ).url = "https://www.blender.org/about/license/"
-
-
-class TOPBAR_MT_app_support(Menu):
- bl_label = "Support Blender"
-
- def draw(self, _context):
- layout = self.layout
-
- layout.operator("wm.url_open_preset",
- text="Development Fund", icon='FUND').type = 'FUND'
-
- layout.separator()
-
- layout.operator(
- "wm.url_open", text="Blender Store", icon='URL',
- ).url = "https://store.blender.org"
-
-
# Include technical operators here which would otherwise have no way for users to access.
class TOPBAR_MT_app_system(Menu):
bl_label = "System"
@@ -854,9 +808,7 @@ classes = (
TOPBAR_MT_workspace_menu,
TOPBAR_MT_editor_menus,
TOPBAR_MT_app,
- TOPBAR_MT_app_about,
TOPBAR_MT_app_system,
- TOPBAR_MT_app_support,
TOPBAR_MT_file,
TOPBAR_MT_file_new,
TOPBAR_MT_file_recover,