Nodes/Avatar Graph/Object Vertex Group Copy
ComfyUI Node

Object Vertex Group Copy

Duplicate a weight group before you wreck it

By avatechai·Created 3 years ago·Updated 2 years ago· 265
Object Vertex Group Copy
  • BPY_OBJ
  • BPY_OBJ

Weight work is destructive by nature. You run Object Vertex Group Invert or Object Vertex Group Levels on a group, and the original weights are gone - there's no history in a ComfyUI graph, and the pack resets the Blender scene every run anyway. Object Vertex Group Copy is your cheap insurance: it duplicates the active vertex group, weights and all, on the same object. It wraps bpy.ops.object.vertex_group_copy().

Think of it as a manual version control for weights. Want to try an inverted version of the "mouth" group without losing the original? Copy it first, then invert the copy, and you can A/B the two on the same mesh. Want a fallback before you aggressively clean a group? Copy, clean the copy. The pattern is "snapshot before you mutate," and for a pipeline that rebuilds everything from scratch each run, the snapshot has to live in the graph itself - which is exactly what this node is for.

One input (BPY_OBJ, the mesh whose active group gets duplicated) and one output (the same object, now carrying the original plus a copy). There's no name or selection parameter on this auto-generated version, so the copy appears as a default-named clone of the active group - you'll want to rename it if a later step references groups by name.

It's worth noting this duplicates the group on the same object. If your intent was "copy the weights from this object onto another object," that's the different operator wrapped by Object Vertex Group Copy To Selected, which has its own multi-object caveats. This node is the simple, safe one.

Install is pack-wide: ComfyUI Manager → "Avatar Graph", or git clone https://github.com/avatechai/avatar-graph-comfyui into ComfyUI/custom_nodes and pip install -r requirements.txt on Python 3.10 (bpy==3.6.0). First launch downloads the ~2.4 GB SAM model.

Troubleshooting: the only real failure mode is forgetting which group is active - the node duplicates the active group, so if you have several groups and the wrong one got copied, set the right one active upstream (the pack's vertex-group ops manage that internally in the scene). And since nothing persists between runs, the discipline is to build your snapshot-and-mutate sequence explicitly in the graph, every run.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ