Nodes/Avatar Graph/Object Set Hide Viewport
ComfyUI Node

Object Set Hide Viewport

Tidy your Blender scene without hiding anything from the render

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Set Hide Viewport
  • BPY_OBJ
  • BPY_OBJ
valuefalse

This is the tidy-up node of the Avatar Graph pack, and it does exactly what it says: ObjectSet Hide Viewport sets Blender's hide_viewport flag, which makes an object disappear from the working view while leaving it fully present in the render.

That split is the whole point, and it's the one beginners routinely get backwards. Viewport-hidden ≠ render-hidden. When you set value to true, the object vanishes from the embedded Avatar View preview and from anything you see while working - but it still renders, still gets exported from Avatar Main Output, and still behaves normally. Use it to get scaffolding out of your sightline (a backdrop plane you're done editing, a helper mesh cluttering the preview) without breaking the actual output.

The other three hide flags are the ones people mix it up with, so here's the short map:

  • HideViewport - hidden while you work, still renders
  • HideRender - hidden in the output, still visible while you work
  • HideSelect - still visible and rendering, just unselectable

For avatar work, viewport-hiding is the low-risk move: it changes your comfort, not your result. The default is false, and the only real cost of setting true is that the object is also hidden from selection in the viewport, which is usually fine since you're hiding things you're done touching.

How it works

Standard ObjectSet_* mechanics: the node is auto-generated from a dump of Blender's bpy.types.Object properties, and on execution it does a setattr on the BPY_OBJ passing through, then returns the same object unchanged for the next node in the chain.

Inputs that matter:

  • BPY_OBJ - the object to hide from the viewport
  • value - boolean, default false; true hides it

Output: the same BPY_OBJ, so you can viewport-hide a helper mid-chain without breaking the flow into Avatar Main Output.

Installing Avatar Graph

This node ships with the whole pack - install once, get everything:

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

Or ComfyUI Manager → Install Custom Nodes → search Avatar Graph → restart. The heavy part is the dependency stack: bpy==3.6.0 pins you to Python 3.10 (the README bundles a Windows 3.10 environment; macOS/Linux want a conda env), and first launch auto-downloads the SAM ViT-H model into ComfyUI/models/sams plus the mediapipe face/pose landmarkers.

Common issues

The "why is it still in my export" panic is almost always this flag being confused with hide_render. Set the wrong one and the object does the opposite of what you meant. Also worth knowing: since the pack resets its Blender scene to factory settings on every graph run, nothing is persisted - if you want an object viewport-hidden, the setter has to be in the chain every time. There's no saved Blender session to fall back on; the graph is the session.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ