[Bf-blender-cvs] [e9d21136ce2] master: UI: Fix Symmetry options in weight paint panels

Hans Goudey noreply at git.blender.org
Mon Oct 26 05:16:36 CET 2020


Commit: e9d21136ce2228a11b788f3202ae929d8fd6d927
Author: Hans Goudey
Date:   Sun Oct 25 23:08:29 2020 -0500
Branches: master
https://developer.blender.org/rBe9d21136ce2228a11b788f3202ae929d8fd6d927

UI: Fix Symmetry options in weight paint panels

The now redundant "X" checkbox is removed since it's also present in the
Symmetry panel above. The Topology Mirror is moved into the Symmetry
panel also.

This was needed because `Mesh.use_x_mirror` has recently been turned into
different functionality, and its old functionality now lives under
`Mesh.use_mirror_vertex_group_x`. Something went wrong in the UI in This
transition.

Differential Revision: https://developer.blender.org/D9287

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index e808c8779c6..83134ea393a 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -957,12 +957,16 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
         layout = self.layout
         tool_settings = context.tool_settings
         wpaint = tool_settings.weight_paint
-        draw_vpaint_symmetry(layout, wpaint, context.object.data)
+        mesh = context.object.data
+        draw_vpaint_symmetry(layout, wpaint, mesh)
 
         col = layout.column()
         row = col.row(align=True)
-        row.prop(context.object.data, 'use_mirror_vertex_group_x')
+        row.prop(mesh, 'use_mirror_vertex_group_x')
 
+        row = layout.row(align=True)
+        row.active = mesh.use_mirror_vertex_group_x
+        row.prop(mesh, "use_mirror_topology")
 
 class VIEW3D_PT_tools_weightpaint_symmetry_for_topbar(Panel):
     bl_space_type = 'TOPBAR'
@@ -995,14 +999,6 @@ class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
 
         col.prop(wpaint, "use_group_restrict")
 
-        obj = context.weight_paint_object
-        if obj.type == 'MESH':
-            mesh = obj.data
-            col.prop(mesh, "use_mirror_x")
-            row = col.row()
-            row.active = mesh.use_mirror_x
-            row.prop(mesh, "use_mirror_topology")
-
 
 # ********** default tools for vertex-paint ****************



More information about the Bf-blender-cvs mailing list