- BPY_OBJ
- BPY_OBJ
Mesh Hide is a small utility node from Avatar Graph, Avatech's node pack for building interactive 2.5D avatars inside ComfyUI. If you've landed here you're probably deep in the weeds of the pack's mesh-editing toolkit - this node isn't one you'll reach for early, but it earns its keep when you need to isolate geometry before running another operation on it.
It's a direct wrapper around Blender's bpy.ops.mesh.hide operator - the same thing that happens when you press H in Blender's edit mode. Avatar Graph embeds Blender's own Python API (bpy) inside ComfyUI, and a large chunk of its node library, including this one, is just individual bpy.ops calls exposed as graph nodes so you can script mesh edits without opening Blender itself.
What it does, mechanically: it hides the currently selected geometry on the mesh (or the opposite - unselected geometry, if you flip the flag) so subsequent operations in the graph don't touch it. This is the same trick you'd use in Blender to work on one part of a mesh without accidentally dragging, deleting, or deforming the rest. In the context of Avatar Graph's rigging pipeline, that's useful when you've built a mesh from multiple layered parts (an eye, a mouth, a body outline) and want to run a cleanup or unwrap operation on just one piece.
There isn't much to configure here, which is honestly refreshing after some of the pack's chunkier transform nodes:
- BPY_OBJ - the mesh object you're operating on, wired in from an earlier node in the chain.
- unselected - a boolean. Leave it
falseto hide what's currently selected (the normal case); flip ittrueto invert the behavior and hide everything except the selection.
The output is the same BPY_OBJ, mutated in place, ready to pass to whatever comes next.
One thing to know before you use this: hiding happens on whatever selection state the mesh already has when this node runs, so it only does something useful if a prior node in your graph has actually set up a selection (something like a box-select or a filter operation). Dropped in cold with no selection upstream, it won't do anything meaningful - it's not a standalone tool, it's a step in a longer edit-mode sequence.
Installing it: Mesh Hide ships as part of the full Avatar Graph pack - there's no standalone install. The easy route is ComfyUI Manager, searching "Avatar Graph" or the repo name avatar-graph-comfyui. Manually: cd ComfyUI/custom_nodes, then git clone https://github.com/avatechai/avatar-graph-comfyui, cd into it and pip install -r requirements.txt, then restart ComfyUI.
The install detail that actually bites people: Avatar Graph needs Python 3.10.x, no more, no less, because the bpy package (Blender bundled as a Python library) only ships wheels for that version. If your ComfyUI is running on a newer Python, expect the install to fail outright rather than half-work - set up a dedicated conda create --name comfyui python=3.10 environment instead of trying to bolt it onto whatever you already have. To get the live avatar preview in Avatech's web editor working, launch with --enable-cors-header (add --force-fp16 on Mac); without it, everything computes fine, you just export .glb/.gltf and open it in Blender or another viewer instead of seeing it update live.
Because this is a raw Blender operator wrapper, the README's own warning applies broadly: the pack is still actively changing, so treat node behavior as somewhat fluid between updates rather than a fixed contract. And remember BPY_OBJ is Avatar Graph's own internal handle - it only makes sense wired to a mesh produced earlier in an Avatar Graph chain, not a mesh type from a different custom-node pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| unselectedopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |