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:
authorAntonio Vazquez <blendergit@gmail.com>2020-07-20 12:11:40 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-07-20 12:11:40 +0300
commitfd0fffaedeb45e249f4ca6b29745e14ec20b36fa (patch)
tree6d2c75d923313651d1c960029bbeee1c17821346 /release/scripts/startup/bl_ui
parent84f744719e8228ace9d203ef444567b8acf97527 (diff)
parent6fbfa522e66d41839449899ab53dbf20d280d5ec (diff)
Merge branch 'master' into greasepencil-edit-curve
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py24
-rw-r--r--release/scripts/startup/bl_ui/space_statusbar.py19
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py17
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py2
4 files changed, 53 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 07c9fc363b5..55b6f76632f 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -279,6 +279,29 @@ class GPENCIL_MT_snap(Menu):
layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid")
+class GPENCIL_MT_snap_pie(Menu):
+ bl_label = "Snap"
+
+ def draw(self, _context):
+ layout = self.layout
+ pie = layout.menu_pie()
+
+ pie.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid", icon='CURSOR')
+ pie.operator("gpencil.snap_to_grid", text="Selection to Grid", icon='RESTRICT_SELECT_OFF')
+ pie.operator("gpencil.snap_cursor_to_selected", text="Cursor to Selected", icon='CURSOR')
+ pie.operator(
+ "gpencil.snap_to_cursor",
+ text="Selection to Cursor",
+ icon='RESTRICT_SELECT_OFF'
+ ).use_offset = False
+ pie.operator(
+ "gpencil.snap_to_cursor",
+ text="Selection to Cursor (Keep Offset)",
+ icon='RESTRICT_SELECT_OFF'
+ ).use_offset = True
+ pie.operator("view3d.snap_cursor_to_center", text="Cursor to World Origin", icon='CURSOR')
+
+
class GPENCIL_MT_move_to_layer(Menu):
bl_label = "Move to Layer"
@@ -901,6 +924,7 @@ class GreasePencilFlipTintColors(Operator):
classes = (
GPENCIL_MT_snap,
+ GPENCIL_MT_snap_pie,
GPENCIL_MT_cleanup,
GPENCIL_MT_move_to_layer,
GPENCIL_MT_layer_active,
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,
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 749e92bdcf7..077b53559aa 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -7034,7 +7034,7 @@ class VIEW3D_MT_gpencil_edit_context_menu(Menu):
col.separator()
col.menu("VIEW3D_MT_mirror", text="Mirror Points")
- col.menu("VIEW3D_MT_snap", text="Snap Points")
+ col.menu("GPENCIL_MT_snap", text="Snap Points")
col.separator()