Modeling: Add Auto Normalize when Assigning vertex weights

Part of #135062.

This PR adds an Auto Normalize option in the Vertex Group panel that
when checked will normalize the other deform-bone vertex groups' weights
when assigning the weight of a deform-bone vertex group. For example if
a selected vertex has the following weights:

| Name    | Weight |
|---------|--------|
| Group 1 | 0.2    |
| Group 2 | 0.2    |
| Group 3 | 0.6    |

And the user selects Group 3, checks the Auto Normalize checkbox, sets
the weight to 0.8, and clicks Assign, the new weights will be:

| Name    | Weight |
|---------|--------|
| Group 1 | 0.1    |
| Group 2 | 0.1    |
| Group 3 | 0.8    |

Co-authored-by: Andy Beers <acbeers1@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/138133
This commit is contained in:
Nathan Vegdahl
2025-05-01 16:08:10 +02:00
committed by Nathan Vegdahl
parent 41a69b76a6
commit 4e7dfcbe3f
3 changed files with 54 additions and 12 deletions

View File

@@ -272,7 +272,11 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
sub.operator("object.vertex_group_select", text="Select")
sub.operator("object.vertex_group_deselect", text="Deselect")
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
col = layout.column(align=True)
col.use_property_split = True
col.separator()
col.prop(context.tool_settings, "vertex_group_weight", text="Weight")
col.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
draw_attribute_warnings(context, layout, None)