Nodes/Avatar Graph/Object Call Select Set
ComfyUI Node

Object Call Select Set

Object Call Select Set — ComfyUI Node from Avatar Graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Call Select Set
  • BPY_OBJ
  • state
  • BPY_OBJ

Part of Avatar Graph, Avatech AI's pack for turning a single character portrait into a real-time interactive 2D avatar - automatic eye blinks, lip sync - built on Blender's Python engine (bpy) as the mesh/rigging backend and Avatech's own "Shape Flow" runtime to drive it live. The README's node table only names a handful of nodes as the actual product: Create Mesh Layer, Create Shape Flow, Avatar Main Output. Object Call Select Set isn't on it - it's one of a large batch of ObjectCall_* nodes exposing Blender's bpy.types.Object API roughly one method per node, generated rather than hand-picked, with zero individual write-up anywhere in the repo.

This is the write side of the Select Get node covered elsewhere on this site: object.select_set(state, view_layer=None) sets whether the given object is selected, in the given view layer (or the active one by default). It matters because Blender's own operators - the transform, duplicate, and modifier tools you'd call from a script the same way you'd click them in the UI - often only act on whatever is currently selected. If a pipeline needs to run one of those operators against a specific object programmatically, setting selection state first is frequently the step that makes it actually target the right thing.

Schema: BPY_OBJ (optional per the schema, but the node has nothing to select without one wired in) and state, whose type is literally state - one of this family's recurring code-gen quirks, where the auto-generator couldn't cleanly map a Blender bool/enum argument to a normal ComfyUI widget and fell back to naming the type after the field. You wire a value into it from elsewhere in the graph rather than flipping a checkbox directly on the node. Output is BPY_OBJ, the same object handle passed through so the selection change carries forward into whatever Object-Call node runs next.

Installing it means installing the whole pack. ComfyUI Manager: search "Avatar Graph." Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && pip install -r requirements.txt, restart. The constraint that'll actually get you: bpy needs Python 3.10.x exactly, so following the README's advice to build a dedicated conda create --name comfyui python=3.10 env instead of reusing an existing Flux/SDXL setup is worth doing rather than skipping. Restart with --enable-cors-header (--force-fp16 too on macOS) so the live avatar preview via Avatech's editor works.

Troubleshooting: expect bpy failing to import at startup - because ComfyUI's Python isn't exactly 3.10.x - to be the wall you actually hit, and it's a common, recurring category of pain across Blender-Python-based ComfyUI nodes generally, this one included. No --enable-cors-header just means no live preview panel; the graph and its .glb/.gltf export off Avatar Main Output keep working fine. Since there's no documentation for this specific node in the repo, and since the state field has no obvious widget, the fastest way to see exactly what value it expects is to check what upstream node in your graph is producing that type - or fall back to Blender's own Object.select_set() reference, which is what's actually running here.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
stateoptstate

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ