Object Set Use Extra User
Keeping generated avatar data from disappearing
- BPY_OBJ
- BPY_OBJ
Blender has a quiet obsession with reference counts, and Object Set Use Extra User is one of the Avatar Graph nodes that exists so you can poke at it. The pack - Avatech's rig for turning a 2D character image into an animatable avatar through an embedded Blender (bpy) - generates an ObjectSet_ node for every simple attribute on Blender's object type, and this one wraps the "extra user" flag on the data-block lifecycle. It sounds like bookkeeping, and it kind of is, but it's the sort of bookkeeping that decides whether your generated mesh data survives.
What it actually does
Blender only keeps a data-block alive while something references it. The moment the last user goes away, the data is scheduled for cleanup. For an avatar pipeline that creates meshes on the fly, that's a hazard: you generate a mesh layer, do a bunch of work, and if some reference gets dropped the underlying data can vanish out from under the graph. The use_extra_user flag (and its more famous sibling use_fake_user, which has its own node) is Blender's way of saying "hold onto this even if the normal reference count says nobody's using it" - a phantom user that keeps the data-block from being treated as garbage.
In practice, that's the whole value proposition: flip it on for objects you've finished building and don't want Blender's cleanup to reclaim while you keep working. It's a persistence flag, not a visible feature - nothing about the mesh changes, you just stop living under threat of the reference counter.
The inputs and outputs that matter
BPY_OBJ- the object whose data you want to protect.value- boolean, defaultfalse. Set ittrueto add the extra user / keep the data alive.
Output is the same BPY_OBJ, so it drops into the middle of any Blender-node chain without disturbing it.
How to install it
Ships with the full Avatar Graph pack - ComfyUI Manager, search "Avatar Graph", or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
restart, done. The install snag that actually bites: the pack pins bpy==3.6.0, and bpy only ships wheels for Python 3.10.x, so a modern-Python install fails outright. python=3.10 conda env on Linux/macOS, Avatech's prebuilt Python-3.10 ComfyUI zip on Windows.
Gotchas
Because this is a no-op visually, the common failure is subtle: your avatar "loses" mesh data between runs or parts of the rig reference missing geometry, and the cause is data cleanup, not your graph logic. If that starts happening, an extra-user flag on the objects you've finalized is a reasonable preventive measure. It's also genuinely hard to tell whether it's doing anything - there's no visible indicator in the ComfyUI canvas - so set it early and move on rather than toggling it later and squinting at the viewport.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| valueopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |