Nodes/Avatar Graph/Object Call Hide Set
ComfyUI Node

Object Call Hide Set

Toggling an object's visibility from the graph

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

ObjectCall_HideSet is the write half of the visibility pair in Avatar Graph's (avatechai/avatar-graph-comfyui) auto-generated Blender API layer, and the more useful half for an automated pipeline. Avatar Graph's headline feature - rigging a still character portrait into a live, blinking, lip-syncing 2D avatar - doesn't route through this node in its documented workflow, but scripting your own multi-step Blender logic on top of it is exactly where this earns its keep.

How it works

It maps to Object.hide_set(state, view_layer), documented as: "set the object's hide state for a given view layer." This is the scripted equivalent of clicking the eye icon next to an object in Blender's outliner - it toggles whether the object shows up in the current view layer.

Why you'd reach for it

Hiding a working or reference object before a bake or render step, then revealing it again afterward, without deleting it and having to recreate it. If your pipeline builds a character mesh out of several intermediate pieces (segmented layers, guide geometry, a reference plane) and only some of them should actually appear in a given render pass, this is the node that flips that switch programmatically.

Inputs and outputs

  • BPY_OBJ (optional) - the object to hide or show.
  • state (optional, default null) - the boolean you're setting: hidden or visible. It ships with no default value in this pack's schema, so set it explicitly rather than assuming a behavior if you leave it blank.

Output is a single BPY_OBJ, the object passed straight through, its hidden state now updated as a side effect.

Installing it

Avatar Graph depends on Blender's bpy module, which is strict about Python version - expect a real install. On Windows, use the author's bundled Python 3.10 environment (linked in their README), unzipped into your ComfyUI folder and launched via the included .bat, then install "Avatar Graph" from ComfyUI Manager. On macOS/Linux, pin your ComfyUI environment to Python 3.10.x exactly - conda is the cleanest way (conda create --name comfyui python=3.10). Then cd ComfyUI/custom_nodes, git clone https://github.com/avatechai/avatar-graph-comfyui.git (their README's own manual-install command points at a stale org, avatechgg - the repo lives under avatechai). cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart with python main.py --enable-cors-header (Mac: also --force-fp16). That flag opens CORS so the hosted viewer at editor.avatech.ai can talk to your local ComfyUI; skip it if you're exporting .glb/.gltf from Avatar Main Output instead.

Common issues

Python-version mismatch is still the near-universal first blocker for this pack - bpy needs 3.10.x. Specific to this node: hide_set() is Blender's outliner-eye-icon flag - it is not the same as hide_render (a separate renderability flag) or hide_viewport (a separate per-object display flag). If an object is still showing up in a headless render despite calling this node, you likely needed a different visibility flag than the one this particular method touches - a genuinely common point of confusion in Blender scripting generally, not specific to this pack. No author documentation exists for this node, so this description leans on Blender's own Object.hide_set() API docs.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
stateoptstate

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ