Object Vertex Weight Set Active
Pick the Weight Group for the Per-Vertex Weight Nodes
- BPY_OBJ
- BPY_OBJ
The per-vertex weight nodes in this pack - Copy, Paste, Delete - all operate on the active vertex and the active weight group. Object Vertex Weight Set Active is the second half of that context: it points the active weight group at the one you want, so the next weight node acts on the right data.
It's the aiming node for the vertex-weight family, the sibling of Object Vertex Group Set Active but tuned to the group index instead of a name. Get this wrong and your copy/paste/delete quietly operates on the wrong group.
How it works
An auto-generated wrapper around Blender's bpy.ops.object.vertex_weight_set_active. Inputs:
- weight_group - the index of the weight group to make active (an integer, default
-1). This is the whole job. - BPY_OBJ - the mesh.
The index-vs-name detail matters: unlike the vertex-group nodes, which take a group name, this one takes a number. You'll want to know your group's index - running a Sort first makes the order predictable and the indexes easy to reason about.
The typical pattern is a chain: Set Active (point at group 2) → Vertex Weight Delete (or Copy/Paste). Output is the same BPY_OBJ, so it slots in as a setup step that feeds the surgical nodes.
Installing it
It's part of Avatar Graph:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
Restart ComfyUI, or install "Avatar Graph" from ComfyUI Manager. Pack-wide install notes: bpy==3.6.0 requires Python 3.10 (the README suggests a dedicated conda env), and bpy is a multi-hundred-MB headless Blender.
Common issues
The predictable trap is a wrong index. Type 0 thinking it's the group you named JawOpen and the next node works on group 0 - possibly the group with no weights. Count your groups, sort first if you must, and double-check before the surgical node runs.
Also remember this sets the weight group, not the active vertex. If your per-vertex ops keep hitting the wrong vertex, that's the active vertex problem, a separate context handled by selection upstream. And the standing rule: no BPY_OBJ from an upstream mesh node, no context to set.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| weight_groupopt | INT | -1-1–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |