[Bf-blender-cvs] [46d3c84528f] temp-lanpr-cleanup: UI: Add XYZ mirroring to the Tool Settings viewport header for Edit and Weight Paint modes

William Reynish noreply at git.blender.org
Mon Sep 16 14:56:24 CEST 2019


Commit: 46d3c84528f4186ae959e46017696f825b9b744a
Author: William Reynish
Date:   Sun Sep 15 15:43:30 2019 +0200
Branches: temp-lanpr-cleanup
https://developer.blender.org/rB46d3c84528f4186ae959e46017696f825b9b744a

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 176705094a7..b3546c4a9b5 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