Object Call Local View Set
Object Call Local View Set — ComfyUI Node from Avatar Graph
- BPY_OBJ
- viewport
- state
- BPY_OBJ
You've found this because it's a node in Avatar Graph, Avatech AI's pack for building real-time interactive 2D avatars from a single character portrait - blinking eyes, lip sync, all driven by Blender's Python engine (bpy) behind the scenes plus Avatech's own "Shape Flow" runtime. The README shows off a short list of headline nodes - Create Mesh Layer, Create Shape Flow, Avatar Main Output - and Object Call Local View Set isn't among them. It belongs to a much larger, undocumented ObjectCall_* family that exposes Blender's bpy.types.Object methods roughly one-to-one as ComfyUI nodes, evidently auto-generated rather than hand-picked for the showcase.
This is the write counterpart to Local View Get. In Blender, "local view" is the isolate-selected mode (Numpad /) that hides everything except the objects you've pushed into it. object.local_view_set(viewport, state) does that programmatically: it toggles whether the given object is shown within a specific viewport's local view, state being the on/off you want. It's a UI-state mutation rather than anything that touches geometry or animation - inside a headless, automated pipeline like Avatar Graph's, this reads like plumbing carried over from the full Object API rather than something you'd reach for while rigging a character.
The schema is small: BPY_OBJ (the object to act on - optional per the schema but useless without one wired in from upstream), viewport, and " state" - note the leading space, one more instance of the auto-generator's fallback where it couldn't resolve a real Blender enum/bool type into a normal ComfyUI widget and just named the type after the field. Neither viewport nor " state" gets you a dropdown or a checkbox; both are supplied by wiring a value in from elsewhere in the graph. Output is BPY_OBJ, same handle passed straight through - this whole family chains rather than reports, so the mutation is the point, not a return value surfaced to you.
Installing it means installing Avatar Graph as a whole. ComfyUI Manager: search "Avatar Graph" and install. 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 ComfyUI. The constraint that actually matters: bpy is pinned hard to Python 3.10.x, and the README's suggestion to set up a dedicated conda create --name comfyui python=3.10 environment rather than reusing whatever you've got for other model work is worth taking seriously - a 3.11/3.12 interpreter just won't resolve the package. Restart with --enable-cors-header (add --force-fp16 on macOS) so ComfyUI and Avatech's live editor can talk to each other for the real-time preview.
Troubleshooting: bpy failing to import at startup is the failure mode you're statistically most likely to hit, and it's almost always a Python-version mismatch rather than anything wrong with this specific node - a known, recurring category of pain across Blender-Python-based ComfyUI nodes in general. Skip --enable-cors-header and nothing crashes; you just lose the live preview panel while the graph and .glb/.gltf export from Avatar Main Output keep working, which the pack's own FAQ confirms is deliberate. Beyond that, since this node has no write-up anywhere in the repo, Blender's own Object.local_view_set() docs are the closest thing to a manual you'll find.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| viewportopt | viewport | — | |
| stateopt | state | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |