[Bf-blender-cvs] [92766fb9651] master: UI: Move Pivot next to Orientation in header

William Reynish noreply at git.blender.org
Tue Feb 26 20:24:42 CET 2019


Commit: 92766fb96519594290d370f2a3bed7accd26c472
Author: William Reynish
Date:   Tue Feb 26 20:24:40 2019 +0100
Branches: master
https://developer.blender.org/rB92766fb96519594290d370f2a3bed7accd26c472

UI: Move Pivot next to Orientation in header

-The pivot point and orientation of any transform are strongly related
-It matches the comma-key and period-key on the keyboard who are neighbours
-We get slightly nicer grouping this way, with the two axis-related options on the left and the two toggles on the right

Reviewers: pablovazquez, campbellbarton
Differential Revision: https://developer.blender.org/D4413

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

M	release/scripts/startup/bl_ui/space_graph.py
M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_view3d.py

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

diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index e7db1d613f2..006232ec071 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -65,6 +65,8 @@ class GRAPH_HT_header(Header):
             icon='FILTER',
         )
 
+        layout.prop(st, "pivot_point", icon_only=True)
+
         layout.prop(st, "auto_snap", text="")
 
         row = layout.row(align=True)
@@ -73,8 +75,6 @@ class GRAPH_HT_header(Header):
         sub.active = tool_settings.use_proportional_fcurve
         sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True)
 
-        layout.prop(st, "pivot_point", icon_only=True)
-
 
 class GRAPH_PT_filters(DopesheetFilterPopoverBase, Panel):
     bl_space_type = 'GRAPH_EDITOR'
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index da2c46c5b7d..eff0374a180 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -559,6 +559,10 @@ class IMAGE_HT_header(Header):
             mesh = context.edit_object.data
             layout.prop_search(mesh.uv_layers, "active", mesh, "uv_layers", text="")
 
+        if show_uvedit or show_maskedit:
+            layout.prop(sima, "pivot_point", icon_only=True)
+
+        if show_uvedit:
             # Snap.
             row = layout.row(align=True)
             row.prop(tool_settings, "use_snap", text="")
@@ -566,6 +570,7 @@ class IMAGE_HT_header(Header):
             if tool_settings.snap_uv_element != 'INCREMENT':
                 row.prop(tool_settings, "snap_target", text="")
 
+            # Proportional Editing
             row = layout.row(align=True)
             row.prop(tool_settings, "proportional_edit", icon_only=True)
             # if tool_settings.proportional_edit != 'DISABLED':
@@ -573,9 +578,6 @@ class IMAGE_HT_header(Header):
             sub.active = tool_settings.proportional_edit != 'DISABLED'
             sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
-        if show_uvedit or show_maskedit:
-            layout.prop(sima, "pivot_point", icon_only=True)
-
         row = layout.row()
         row.popover(
             panel="IMAGE_PT_view_display",
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index e73b2538bee..19e9c3f8041 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -144,6 +144,17 @@ class VIEW3D_HT_header(Header):
                 icon_value=trans_icon,
             )
 
+        # Pivot
+        if object_mode in {'OBJECT', 'EDIT', 'POSE', 'EDIT_GPENCIL', 'SCULPT_GPENCIL'}:
+            pivot_point = tool_settings.transform_pivot_point
+            act_pivot_point = bpy.types.ToolSettings.bl_rna.properties["transform_pivot_point"].enum_items[pivot_point]
+            row = layout.row(align=True)
+            row.popover(
+                panel="VIEW3D_PT_pivot_point",
+                icon=act_pivot_point.icon,
+                text="",
+            )
+
         # Snap
         show_snap = False
         if obj is None:
@@ -218,16 +229,6 @@ class VIEW3D_HT_header(Header):
                 sub.active = tool_settings.proportional_edit != 'DISABLED'
                 sub.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
 
-        # Pivot
-        if object_mode in {'OBJECT', 'EDIT', 'POSE', 'EDIT_GPENCIL', 'SCULPT_GPENCIL'}:
-            pivot_point = tool_settings.transform_pivot_point
-            act_pivot_point = bpy.types.ToolSettings.bl_rna.properties["transform_pivot_point"].enum_items[pivot_point]
-            row = layout.row(align=True)
-            row.popover(
-                panel="VIEW3D_PT_pivot_point",
-                icon=act_pivot_point.icon,
-                text="",
-            )
         # grease pencil
         if object_mode == 'PAINT_GPENCIL':
             origin = tool_settings.gpencil_stroke_placement_view3d



More information about the Bf-blender-cvs mailing list