Nodes/Avatar Graph/Object Hide View Set
ComfyUI Node

Object Hide View Set

The Blender 'hide this so it stops blocking my view' node for Avatar Graph

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Hide View Set
  • BPY_OBJ
  • BPY_OBJ
unselectedfalse

If you've ever rigged anything in Blender you know the drill: you're trying to grab the mouth verts but the hair mesh is sitting right on top of them, so you hit H to hide it and get on with your life. Object_HideViewSet is that exact H key, as a ComfyUI node, inside the Avatar Graph pack.

The pack (from Avatech Limited) embeds a real Blender 3.6 scene in ComfyUI and rebuilds it from factory settings on every run. These Object_* nodes are thin wrappers around Blender's object operators, so you get a surprisingly honest slice of the Blender toolset in your graph. Hiding objects is one of the most useful bits of that honesty - when your avatar build has five overlapping mesh layers (eyes, mouth, hair, body), you need a way to work on one without the others yelling at you.

How it works

Under the hood this calls bpy.ops.object.hide_view_set() - the same operator Blender's viewport H shortcut triggers. The single toggle you actually control is unselected:

  • unselected = false (default) - hides the object you fed in on the BPY_OBJ input. It's the "hide selected" case.
  • unselected = true - flips it: hides everything except the object on BPY_OBJ. Great for "solo this layer" moments.

The BPY_OBJ input is a reference to a live object in the embedded Blender scene, and it comes back out unchanged. That pass-through is the pack's convention: every object operator node takes the object, does its thing to the scene state, and hands you the same object so you can keep chaining nodes. If you leave the input empty, it operates on whatever object is currently active in the scene.

When you actually use it

In the Avatar Graph rigging flow you'll typically place this between the SAM/Create Mesh Layer stage and the rig stage. Say you segmented the body and the hair as separate layers. Hide the hair while you build the blink shape keys on the face, then unhide later - or leave the output wired to a node that keeps building. Visibility state carries across the graph run, so a hidden object can still be modified by later nodes; hiding only affects what you see in the embedded viewport, not the data.

One thing worth knowing: because the scene resets between executions, "hiding" is always relative to the scene your graph just built - it won't accumulate across runs. That's a feature if you like deterministic graphs, and a mild annoyance if you expected persistent state.

Installing it

This node ships in the Avatar Graph pack. ComfyUI Manager is the easy route - search "Avatar Graph". By hand:

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

The real gotcha is the pack pins bpy==3.6.0, and that wheel needs Python 3.10.x - 3.11/3.12 won't build it and every node in the pack silently fails to register. The README suggests a dedicated conda env, and on Windows Avatech ship a pre-bundled Python 3.10 ComfyUI archive that's the path of least resistance. First launch also pulls the SAM ViT-H checkpoint (~2.5 GB) and MediaPipe landmarkers, so the first start is slow. And for the live avatar preview you run ComfyUI with --enable-cors-header.

Common issues

Most trouble with this node isn't the node - it's the pack-level stuff: wrong Python version, or objects not appearing because a node upstream never created them in the embedded scene. If "hiding" seems to do nothing, check that the object you fed in is actually the one you think it is (object names in the embedded scene can collide after a rebuild). And remember the README's own warning: the pack is still "making changes to the nodes and demo templates," so treat this as an alpha-stage toolbox.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
unselectedoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ