EasyWeight: Major update #317

Merged
Demeter Dzadik merged 9 commits from easyweight-updates into main 2024-06-25 21:09:03 +02:00
8 changed files with 84 additions and 78 deletions
Showing only changes of commit 2189c0168d - Show all commits

View File

@ -1 +1,76 @@
<!--@include: ../../scripts-blender/addons/easy_weight/README.md--> # Easy Weight
Easy Weight is an addon focused on quality of life improvements for weight painting in Blender.
---
### Installation
In Blender 4.2, Easy Weight can be added through the official extensions repository, so you can simply search for it in Blender.
For older versions, find installation instructions [here](https://studio.blender.org/pipeline/addons/overview).
---
# Features
Easy Weight allows you to control some scene-level tool settings at the user preference level. You can find these in the add-on's preferences.
![EasyWeight Hotkeys](../media/addons/easy_weight/prefs.png)
- **Always Auto-Clean**: A new feature in the add-on which cleans zero-weights after each brush stroke.
- **Always Show Zero Weights**: Forces [Blender's Show Zero Weights](https://docs.blender.org/manual/en/latest/editors/3dview/display/overlays.html#bpy-types-toolsettings-vertex-group-user) overlay option to "Active".
- **Always Auto Normalize**: Forces [Blender's Auto-Normalize](https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-toolsettings-use-auto-normalize) setting to be always on.
- **Always Multi-Paint**: Forces [Blender's Multi-Paint](https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/tool_settings/options.html#bpy-types-toolsettings-use-multipaint) setting to be always on.
## Hotkeys
You can also find some hotkeys in the preferences. You can customize or disable these as you wish.
### Weight Paint Pie (W)
On the **W** key is this pie menu:
![EasyWeight Pie](../media/addons/easy_weight/pie.png)
- Operators:
- Focus Deforming Bones: Reveal and isolate all deforming bones contributing to the active mesh.
- Clear Empty Deform Groups: Remove vertex groups associated with deforming bones, which don't have any weights at all.
- Clear Unused Groups: Remove vertex groups which are not associated with a deforming bone, and not used by any shape key, modifier, or constraint.
- [Assign Automatic From Bones](https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/editing.html#bpy-ops-paint-weight-from-bones)
- [Normalize Deform Groups](https://docs.blender.org/manual/en/latest/sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize-all)
- Global Brush Settings:
- These three options will affect all weight paint brushes in the scene.
- [Accumulate](https://docs.blender.org/manual/en/latest/sculpt_paint/brush/brush_settings.html#advanced)
- [Falloff Shape](https://docs.blender.org/manual/en/latest/sculpt_paint/brush/falloff.html)
- [Paint Through Mesh](https://docs.blender.org/manual/en/latest/sculpt_paint/brush/brush_settings.html#advanced)
- Overlay Settings:
- [Weight Contours](https://docs.blender.org/manual/en/latest/editors/3dview/display/overlays.html#weight-paint-overlays)
- Wireframe
- Bones
- [Armature Display Type](https://docs.blender.org/manual/en/latest/animation/armatures/properties/display.html#bpy-types-armature-display-type)
- In Front (X-Ray)
### Hunting Rogue Weights
![Weight Islands](../media/addons/easy_weight/weight_islands.png)
The Weight Islands panel lets you hunt down unintended rogue weights on a mesh. The workflow goes something like this:
- After pressing Calculate Weight Islands and waiting a few seconds, you will see a list of all vertex groups which consist of more than a single island.
- Clicking the magnifying glass icon will focus the smallest island in the group, so you can decide what to do with it.
- If the island is rogue weights, you can subtract them and go back to the previous step. If not, you can press the checkmark icon next to the magnifying glass, and the vertex group will be hidden from the list.
- Continue with this process until all entries are gone from the list.
- In the end, you can be 100% sure that you have no rogue weights anywhere on your mesh.
### Vertex Group Operators
![Vertex Group Menu](../media/addons/easy_weight/vg_context_menu.png)
The Vertex Groups context menu is re-organized with more icons and better labels, as well as some additional operators:
- **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.
- **Focus Deforming Bones**: Reveal and select all bones deforming this mesh. Only in Weight Paint mode.
- **Symmetrize Vertex Groups**: Symmetrizes vertex groups from left to right side, creating missing groups as needed.
If you have any more suggestions, feel free to open an Issue with a feature request.
### 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.

Binary file not shown.

BIN
docs/media/addons/easy_weight/pie.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
docs/media/addons/easy_weight/prefs.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,65 +1,5 @@
# Easy Weight # Easy Weight
Easy Weight is an addon focused on quality of life improvements for weight painting in Blender. Easy Weight is an addon focused on quality of life improvements for weight painting in Blender.
## Table of Contents You can find the documentation [here](https://studio.blender.org/pipeline/addons/easy_weight).
- [Installation](#installation)
- [How to Use](#how-to-use)
- [Entering Weight Paint Mode](#entering-weight-paint-mode)
- [Weight Paint Context Menu](#weight-paint-context-menu)
- [Hunting Rogue Weights](#hunting-rogue-weights)
- [Vertex Group Operators](#vertex-group-operators)
- [Force Apply Mirror Modifier](#force-apply-mirror-modifier)
- [Previous Features](#previous-features)
## Installation
Find installation instructions [here](https://studio.blender.org/pipeline/addons/overview).
## Features
### Entering Weight Paint Mode
An operator called "Toggle Weight Paint" is added under the "Object" and "Weight" menus in the 3D View. You can right-click the operator in either of these locations to assign a shortcut. I use pie menu object modes on Tab, so my Ctrl+Tab shortcut is available for this.
The operator will switch into weight paint mode without having to select both the armature and the mesh. Just select a mesh and press the shortcut you assigned. The armature will be un-hidden and put into pose mode if necessary.
Press the shortcut again to reset the armature object's visibility state to what it was before, and go back to Object Mode.
### Weight Paint Context Menu
The add-on will override Blender's built-in "W" shortcut for the Context Menu in weight paint mode.
Simply enter Weight Paint mode and press W after installing the add-on.
This pop-up panel provides quick access to commonly needed tools, whether they are part of core Blender or the addon:
- Toggles for the Accumulate, Front Faces Only and Falloff Shape brush options. These are normally per-brush, but these buttons will affect ALL Weight Paint brushes.
- Weight Paint settings: Auto-Normalize, Multi-Paint, X-Mirror.
- A new "Clean Weights" option. When enabled, this will remove 0-weights after every brush stroke.
- Commonly used Overlay and Armature display settings.
- Commonly used or [new](#vertex-group-operators) operators.
### Hunting Rogue Weights
The addon provides a workflow for hunting down rogue weights efficiently but safely, with just the right amount of automation. This functionality can be found in the Sidebar->EasyWeight->Weight Islands panel.
- After pressing Calculate Weight Islands and waiting a few seconds, you will see a list of all vertex groups which consist of more than a single island.
- Clicking the magnifying glass icon will focus the smallest island in the group, so you can decide what to do with it.
- If the island is rogue weights, you can subtract them and go back to the previous step. If not, you can press the checkmark icon next to the magnifying glass, and the vertex group will be hidden from the list.
- Continue with this process until all entries are gone from the list.
- In the end, you can be 100% sure that you have no rogue weights anywhere on your mesh.
### Vertex Group Operators
The Vertex Groups context menu is re-organized with more icons and better labels, as well as some additional operators:
- **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.
- **Focus Deforming Bones**: Reveal and select all bones deforming this mesh. Only in Weight Paint mode.
- **Symmetrize Vertex Groups**: Symmetrizes vertex groups from left to right side, creating missing groups as needed.
If you have any more suggestions, feel free to open an Issue with a feature request.
### 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.
## Previous Features
Over time as more things have been fixed on Blender's side, some features have been removed. To avoid confusion, these are listed here:
- As of [Blender 3.1](https://projects.blender.org/blender/blender/commit/a215d7e230d3286abbed0108a46359ce57104bc1), holding the Ctrl and Shift buttons in weight painting will use the Subtract and Blur brushes respectively, removing the need for the shortcuts on the 1, 2, 3 keys this addon used to add to provide quick brush switching.
- As of [Blender 3.0](https://projects.blender.org/blender/blender/issues/61486), the weight paint overlay is no longer multiplied on top of the underlying colors, removing the need for this addon to change shading or object display settings when using the Toggle Weight Paint mode operator.

View File

@ -59,12 +59,6 @@ class EASYWEIGHT_MT_PIE_easy_weight(Menu):
if deform_rig: if deform_rig:
layout.operator('object.focus_deform_vgroups', icon='ZOOM_IN') layout.operator('object.focus_deform_vgroups', icon='ZOOM_IN')
op = layout.operator(
'object.vertex_group_normalize_all', text="Normalize Deform Groups", icon='IPO_SINE'
)
op.group_select_mode = 'BONE_DEFORM'
op.lock_active = False
layout.operator( layout.operator(
'object.delete_empty_deform_vgroups', 'object.delete_empty_deform_vgroups',
text="Clear Empty Deform Groups", text="Clear Empty Deform Groups",
@ -82,7 +76,7 @@ class EASYWEIGHT_MT_PIE_easy_weight(Menu):
'paint.weight_from_bones', text="Assign Automatic from Bones", icon='BONE_DATA' 'paint.weight_from_bones', text="Assign Automatic from Bones", icon='BONE_DATA'
).type = 'AUTOMATIC' ).type = 'AUTOMATIC'
op = layout.operator( op = layout.operator(
'object.vertex_group_normalize_all', text="Normalize Deform", icon='IPO_SINE' 'object.vertex_group_normalize_all', text="Normalize Deform Groups", icon='IPO_SINE'
) )
op.group_select_mode = 'BONE_DEFORM' op.group_select_mode = 'BONE_DEFORM'
op.lock_active = False op.lock_active = False