Add Easy_Weight to Addons #47

Merged
Nick Alberelli merged 48 commits from feature/easy_weights into main 2023-05-17 22:13:57 +02:00
4 changed files with 16 additions and 6 deletions
Showing only changes of commit 827a3dd9fe - Show all commits

View File

@ -33,6 +33,16 @@ I recommend to overwrite the shortcut of the default weight paint context menu l
### Toggle Weight Cleaner
This is a new functionality found in the custom WP context menu. When enabled, **this will run the Clean Vertex Groups operator after every brush stroke** while you're in weight paint mode. This means 0-weights are automatically removed as they appear, which helps avoid small weight islands and rogue weights appearing as you work.
### Vertex Group Operators
The Vertex Groups context menu is re-organized with more icons and better labels, as well as some additional operators:
<img src="docs/vg_context_menu.png" width="500" />
- **Delete Empty Deform Groups**: Delete deforming groups that don't have any weights.
- **Delete Unused Non-Deform Groups**: Delete non-deforming groups that aren't used anywhere, even if they do have weights.
- **Delete Unselected Deform Groups**: Delete all deforming groups that don't correspond to a selected pose bone. Only in Weight Paint mode.
- **Ensure Mirror Groups**: If your object has a Mirror modifier, this will create any missing vertex groups.
- **Focus Deforming Bones**: Reveal and select all bones deforming this mesh. Only in Weight Paint mode.
TODO: Operators to hunt down rogue weights and ensure symmetrical weights.
### Force Apply Mirror Modifier
In Blender, you cannot apply a mirror modifier to meshes that have shape keys.
This operator tries to anyways, by duplicating your mesh, flipping it on the X axis and merging into the original. It will also flip vertex groups, shape keys, shape key masks, and even (attempt) shape key drivers, assuming everything is named with .L/.R suffixes.

BIN
docs/vg_context_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -14,18 +14,18 @@ class MESH_MT_vertex_group_batch_delete(bpy.types.Menu):
layout = self.layout
layout.operator(
"object.vertex_group_remove",
text="Delete All Groups",
text="All Groups",
icon='TRASH'
).all = True
layout.operator(
"object.vertex_group_remove",
text="Delete All Unlocked Groups",
text="All Unlocked Groups",
icon='UNLOCKED'
).all_unlocked = True
layout.separator()
layout.operator(DeleteEmptyDeformGroups.bl_idname, icon='GROUP_BONE')
layout.operator(DeleteUnusedVertexGroups.bl_idname, icon='BRUSH_DATA')
layout.operator(DeleteUnselectedDeformGroups.bl_idname, icon='RESTRICT_SELECT_ON')
layout.operator(DeleteEmptyDeformGroups.bl_idname, text="Empty Deform Groups", icon='GROUP_BONE')
layout.operator(DeleteUnusedVertexGroups.bl_idname, text="Unused Non-Deform Groups", icon='BRUSH_DATA')
layout.operator(DeleteUnselectedDeformGroups.bl_idname, text="Unselected Deform Groups", icon='RESTRICT_SELECT_ON')
class MESH_MT_vertex_group_mirror(bpy.types.Menu):
bl_label = "Mirror"

View File

@ -132,7 +132,7 @@ def reveal_bone(bone, select=True):
class FocusDeformBones(WeightPaintOperator):
"""Reveal the layers of, unhide, and select the bones of all deforming vertex groups"""
bl_idname = "object.focus_deform_vgroups"
bl_label = "Focus Deform Groups"
bl_label = "Focus Deforming Bones"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):