vertex_group_operation
Clean up or reshape vertex group weights by normalizing, inverting, cleaning, smoothing, leveling, limiting, mirroring, or quantizing them for rigging and game-engine workflows.
Instructions
Clean up or reshape the weights in a vertex group.
Args: object_name: Mesh object. group_name: Vertex group to work on. operation: One of: NORMALIZE (scale so the highest weight is 1), NORMALIZE_ALL (make each vertex's weights across all groups sum to 1, as armatures expect), INVERT (weight becomes 1 - weight), CLEAN (drop weights at or below threshold), SMOOTH (blur weights with neighbours: factor, repeat), LEVELS (weight * gain + offset), LIMIT_TOTAL (keep at most max_groups groups per vertex, as game engines need), MIRROR (mirror the weights across X), QUANTIZE (snap weights to steps levels). factor: SMOOTH strength, 0.0 to 1.0. repeat: SMOOTH passes, 1 to 200. threshold: CLEAN cut-off, 0.0 to 1.0. offset: LEVELS offset, -1.0 to 1.0. gain: LEVELS gain, 0.0 to 10.0. max_groups: LIMIT_TOTAL groups per vertex, 1 to 32. steps: QUANTIZE levels, 1 to 1000.
Returns: Dict with the group's vertex count and weight range afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gain | No | ||
| steps | No | ||
| factor | No | ||
| offset | No | ||
| repeat | No | ||
| operation | Yes | ||
| threshold | No | ||
| group_name | Yes | ||
| max_groups | No | ||
| object_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||