assign_vertex_group
Assigns mesh vertices to a vertex group with a weight, creating the group if it doesn't exist. Use it to drive armature skinning and limit modifiers or shape keys to part of a mesh.
Instructions
Put vertices into a vertex group with a weight, creating the group if needed.
Vertex groups drive armature skinning, and limit modifiers (Displace, Solidify, Mask) and shape keys to part of a mesh.
Args: object_name: Mesh object. group_name: Vertex group; created if it does not exist. vertex_indices: Vertices to change. Omit to use the whole mesh, or the edit-mode selection with selection="CURRENT". weight: 0.0 to 1.0. mode: REPLACE sets the weight, ADD and SUBTRACT change it, REMOVE takes the vertices out of the group. selection: When vertex_indices is omitted: ALL vertices, or CURRENT for the ones selected in edit mode (use the select_* tools first).
Returns: Dict with the group name, its index and how many vertices changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | REPLACE | |
| weight | No | ||
| selection | No | ALL | |
| group_name | Yes | ||
| object_name | Yes | ||
| vertex_indices | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||