[Bf-blender-cvs] [8e62fdbcbda] master: UI: Add XYZ mirroring to the Tool Settings viewport header for Edit and Weight Paint modes

William Reynish noreply at git.blender.org
Sun Sep 15 15:43:32 CEST 2019


Commit: 8e62fdbcbda6be409d7841a45e723b6e1e496a91
Author: William Reynish
Date:   Sun Sep 15 15:43:30 2019 +0200
Branches: master
https://developer.blender.org/rB8e62fdbcbda6be409d7841a45e723b6e1e496a91

UI: Add XYZ mirroring to the Tool Settings viewport header for Edit and Weight Paint modes

Previously, only X mirror was available here, but since we can now mirror on Y and Z, these should also be added.

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 6f4d59e3e05..e080dcbf202 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -129,6 +129,8 @@ class VIEW3D_HT_tool_header(Header):
         if mode_string == 'EDIT_MESH':
             _row, sub = row_for_mirror()
             sub.prop(context.object.data, "use_mirror_x", text="X", toggle=True)
+            sub.prop(context.object.data, "use_mirror_y", text="Y", toggle=True)
+            sub.prop(context.object.data, "use_mirror_z", text="Z", toggle=True)
             tool_settings = context.tool_settings
             layout.prop(tool_settings, "use_mesh_automerge", text="")
         elif mode_string == 'EDIT_ARMATURE':
@@ -139,7 +141,10 @@ class VIEW3D_HT_tool_header(Header):
             sub.prop(context.object.pose, "use_mirror_x", text="X", toggle=True)
         elif mode_string == 'PAINT_WEIGHT':
             row, sub = row_for_mirror()
-            sub.prop(context.object.data, "use_mirror_x", text="X", toggle=True)
+            wpaint = context.tool_settings.weight_paint
+            sub.prop(wpaint, "use_symmetry_x", text="X", toggle=True)
+            sub.prop(wpaint, "use_symmetry_y", text="Y", toggle=True)
+            sub.prop(wpaint, "use_symmetry_z", text="Z", toggle=True)
             row.popover(panel="VIEW3D_PT_tools_weightpaint_symmetry_for_topbar", text="")
         elif mode_string == 'SCULPT':
             row, sub = row_for_mirror()



More information about the Bf-blender-cvs mailing list