Nodes/Avatar Graph/Object Set Users
ComfyUI Node

Object Set Users

The Avatar Graph node that sets a number Blender owns

By avatechai·Created 3 years ago·Updated 2 years ago· 265
Object Set Users
  • BPY_OBJ
  • BPY_OBJ
value1

Every pack has a node that makes you go "wait, really?" Object Set Users is that node for Avatar Graph. It's an integer setter whose default value is 1, wired to a Blender property called users - which, in Blender, is a read-only count of how many things reference a given data-block. This is the auto-generator's most honest moment: the pack scrapes every simple attribute off Blender's object type and wraps each in a setter, and users is one of the attributes that Blender itself computes. You can't meaningfully set it, because the only thing that changes it is actually using the object.

What it actually does

In Blender's data model, a "user" is a reference. The mesh data's user count goes up when you assign it to more objects, and down when you unassign or delete them. It's a diagnostic number - the one you read in the outliner when you're wondering whether an asset is still referenced. The pack's ObjectSet_Users node attempts to set that number directly on the incoming BPY_OBJ. In practice that's a no-op: the property is read-only, so the assignment silently does nothing, and the real count keeps reflecting whatever your graph actually wired up.

Which makes this node useless for rigging - but genuinely interesting as a window into how the pack works. Avatar Graph's ObjectSet_ family is generated mechanically from Blender's attribute list (blender/ops_mesh.py), which is why it contains genuinely useful flags next to read-only diagnostics like this one. There's no curation layer deciding "this one's settable, that one isn't." You get the whole surface of the Blender API, warts included.

The inputs and outputs that matter

  • BPY_OBJ - the object whose (read-only) user count you're "setting."
  • value - integer, default 1.

Output is the same BPY_OBJ, untouched. If you're looking for the actual "keep this data alive" switches, those are the fake-user/extra-user siblings (ObjectSet_UseFakeUser, ObjectSet_UseExtraUser) - they do what this node's name promises.

How to install it

It's part of the Avatar Graph pack, no standalone install. ComfyUI Manager → search "Avatar Graph", or:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt

restart ComfyUI. The pack-wide gotcha: bpy==3.6.0 only ships wheels for Python 3.10.x, so install fails on modern Python. python=3.10 conda env, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows.

Gotchas

The troubleshooting advice here is "don't." If you drop this node into a graph expecting it to change how many objects reference your mesh, nothing will happen - that's correct behavior, not a bug in your workflow. The only genuine gotcha is misreading it as a fake-user flag and "fixing" your disappearing-mesh problem with the wrong node. Want data to survive? Use ObjectSet_UseFakeUser. This one is a museum piece.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptINT1

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ