diff options
author | William Reynish <billrey@me.com> | 2019-02-26 22:24:40 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-02-26 22:24:40 +0300 |
commit | 92766fb96519594290d370f2a3bed7accd26c472 (patch) | |
tree | 95611119b5f7d1fe1124ac7c6d68b0a8ca12dddb /release | |
parent | 4d9697a5a90de08d30de373cf6dc83f8130fffdc (diff) |
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
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 8 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 21 |
3 files changed, 18 insertions, 15 deletions
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 |