UI: Add XYZ mirroring to the Tool Settings viewport header for Edit and Weight Paint...
authorWilliam Reynish <billrey@me.com>
Sun, 15 Sep 2019 13:43:30 +0000 (15:43 +0200)
committerWilliam Reynish <billrey@me.com>
Sun, 15 Sep 2019 13:43:30 +0000 (15:43 +0200)
Previously, only X mirror was available here, but since we can now mirror on Y and Z, these should also be added.

release/scripts/startup/bl_ui/space_view3d.py

index 6f4d59e3e0511fdd2bf6bd8830a606a2fc309369..e080dcbf202206f1ad8bb4122c7b344cd1c0d13e 100644 (file)
@@ -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()