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-07-18 17:49:25 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-07-18 17:49:25 +0300
commitc08d847488048e9d5233bfd14e363de574332846 (patch)
tree59cd059ab1d146db2cebd8051319009adfcd5ea4 /release
parentfe49e4139cd3f78f126b60ea4240a0294eac9483 (diff)
UI: Status Bar Statistics and Other Options
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672. Differential Revision: https://developer.blender.org/D7557 Reviewed by Julian Eisel
Diffstat (limited to 'release')
-rw-r--r--release/datafiles/userdef/userdef_default.c2
-rw-r--r--release/scripts/startup/bl_ui/space_statusbar.py19
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py17
3 files changed, 30 insertions, 8 deletions
diff --git a/release/datafiles/userdef/userdef_default.c b/release/datafiles/userdef/userdef_default.c
index 31d0eb8e923..fbdb226ab6d 100644
--- a/release/datafiles/userdef/userdef_default.c
+++ b/release/datafiles/userdef/userdef_default.c
@@ -229,6 +229,8 @@ const UserDef U_default = {
.collection_instance_empty_size = 1.0f,
+ .statusbar_flag = STATUSBAR_SHOW_VERSION,
+
.runtime =
{
.is_dirty = 0,
diff --git a/release/scripts/startup/bl_ui/space_statusbar.py b/release/scripts/startup/bl_ui/space_statusbar.py
index 4984372eed3..cbf72a7bc59 100644
--- a/release/scripts/startup/bl_ui/space_statusbar.py
+++ b/release/scripts/startup/bl_ui/space_statusbar.py
@@ -31,17 +31,20 @@ class STATUSBAR_HT_header(Header):
layout.separator_spacer()
- # messages
- layout.template_reports_banner()
- layout.template_running_jobs()
-
+ # Nothing in the center.
layout.separator_spacer()
- # stats
- scene = context.scene
- view_layer = context.view_layer
+ row = layout.row()
+ row.alignment = 'RIGHT'
+
+ # Stats & Info
+ row.label(text=context.screen.statusbar_info(), translate=False)
+
+ # Messages
+ row.template_reports_banner()
- layout.label(text=scene.statistics(view_layer), translate=False)
+ # Progress Bar
+ row.template_running_jobs()
classes = (
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 66c98b81e0e..03f85578b6e 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -283,6 +283,22 @@ class USERPREF_PT_interface_temporary_windows(InterfacePanel, CenterAlignMixIn,
col.prop(view, "filebrowser_display_type", text="File Browser")
+class USERPREF_PT_interface_statusbar(InterfacePanel, CenterAlignMixIn, Panel):
+ bl_label = "Status Bar"
+ bl_parent_id = "USERPREF_PT_interface_editors"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_centered(self, context, layout):
+ prefs = context.preferences
+ view = prefs.view
+
+ col = layout.column(heading="Show")
+ col.prop(view, "show_statusbar_stats", text="Scene Statistics")
+ col.prop(view, "show_statusbar_memory", text="System Memory")
+ col.prop(view, "show_statusbar_vram", text="Video Memory")
+ col.prop(view, "show_statusbar_version", text="Blender Version")
+
+
class USERPREF_PT_interface_menus(InterfacePanel, Panel):
bl_label = "Menus"
bl_options = {'DEFAULT_CLOSED'}
@@ -2189,6 +2205,7 @@ classes = (
USERPREF_PT_interface_display,
USERPREF_PT_interface_editors,
USERPREF_PT_interface_temporary_windows,
+ USERPREF_PT_interface_statusbar,
USERPREF_PT_interface_translation,
USERPREF_PT_interface_text,
USERPREF_PT_interface_menus,