Nodes/Avatar Graph/Object Set Name
ComfyUI Node

Object Set Name

Rename your avatar's parts without ever opening Blender

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Set Name
  • BPY_OBJ
  • BPY_OBJ
valueCube

Every mesh layer in an Avatar Graph rig gets a Blender object name when it's created - usually "Cube", because the pack builds its meshes from a default cube and Blender's default object name is exactly that. Object Set Name is the node you wire in when you want that object to be called something you can actually find in the export, like eye_left or jaw_lower. It's the single most useful setter in the whole ObjectSet_* family, because every other node that references a part by name depends on names being right.

How it works

The ObjectSet_* nodes aren't hand-written features - they're auto-generated from Blender's bpy.types.Object property list at build time. Each one is a glorified one-liner: you feed it a BPY_OBJ plus a value, and it runs setattr(object, <property>, value) against the embedded Blender (bpy) instance, then hands the same BPY_OBJ back out on the other side.

For this node the property is name - the display name of the object. The default value is "Cube", matching the default cube the pack spawns, but the field is a plain STRING you can type anything into. Because the node returns the same object it received, you can chain setters in series: create the mesh, rename it, set its pass index, and only then hand it to an output. The name change is instantly reflected in the embedded viewport and in whatever you export.

The two inputs that matter

  • BPY_OBJ - the Blender object reference, usually straight out of Create Mesh Layer or a Mesh_ primitive node.
  • value - the new name, as a string. Defaults to "Cube".

The output is the same BPY_OBJ, so chain away. Nothing else on this node needs touching.

Install

This ships inside the Avatar Graph pack, so install that once:

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

Or just search "Avatar Graph" in ComfyUI Manager and let it handle the pip step. The catch: this pack pins bpy==3.6.0, which only builds for Python 3.10 - if your ComfyUI runs 3.11+ you'll hit a hard import error before you ever see these nodes. A conda env with python=3.10 is the README's recommendation. First launch also auto-downloads the SAM ViT-H model (~2.5 GB) plus face/pose landmarker files, so the first start is slow and chunky.

Common issues

People mostly hit the pack-level traps here, not node-specific ones. If the name doesn't stick, check that the setter is wired after the node that creates the object - the bpy scene is reset at the start of each queue run, so a setter upstream of creation operates on nothing. And on ComfyUI Desktop specifically there are reports of the pack's embedded editor overlay rendering oversized and wrecking the UI after install; if that happens, run the browser build or reinstall via Manager and the nodes themselves are fine. Remember this is an interactive-avatar pipeline: without --enable-cors-header you lose the live preview but the graph still runs and you can export via Save File on Avatar Main Output.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptSTRINGCube

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ