Nodes/Avatar Graph/Object Face Map Select
ComfyUI Node

Object Face Map Select

Turning a face map's membership into an actual selection

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Face Map Select
  • BPY_OBJ
  • BPY_OBJ

Where Object_FaceMapAssign goes from "selected faces" to "membership in a map," Object Face Map Select runs it the other direction: it takes the faces already tagged as members of the active face map and selects them in Edit Mode, so you can then act on that selection with whatever mesh tool comes next.

How it works

It wraps bpy.ops.object.face_map_select(). The object has to be in Edit Mode for this to do anything - if you're not already there, run Object_EditmodeToggle first. Once in Edit Mode, this node adds the active face map's members to the current selection; it's additive to whatever's already selected, not a full "select only these faces and nothing else" reset.

Think of it as recalling a saved group: you tagged a set of faces earlier with Object_FaceMapAssign, and now you want to work on exactly that set again - maybe to apply a material, extrude a region, or feed them into a downstream node that operates on the current selection - without manually reselecting them.

The inputs and outputs that matter

There's exactly one input:

  • BPY_OBJ - the object whose active face map's faces get selected.

Output is a single BPY_OBJ, with the selection updated in Edit Mode.

How to install it

ComfyUI Manager: search "Avatar Graph", install, restart - or manually:

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

bpy needs Python 3.10.x, no exceptions. Windows gets a prebuilt Python-3.10 ComfyUI zip from the README; macOS/Linux wants a dedicated conda create --name comfyui python=3.10 environment. Add --enable-cors-header on restart (--force-fp16 too on Mac) for the live avatar preview; without it you still get full functionality via .glb/.gltf export.

Common issues & troubleshooting

Node not loading traces to the Python-version pin - check the startup console for a bpy import error first.

Selection didn't change - two likely causes: the object isn't in Edit Mode (this operator needs it), or the active face map is empty (nothing was ever assigned to it via Object_FaceMapAssign). Both leave the selection untouched, silently.

Selected more than expected - remember this adds to the existing selection rather than replacing it. If something was already selected before this node ran, you'll end up with the union of both, not just the face map's members. Clear the selection first if you need exactly the face map's contents and nothing else.

Selecting from the wrong map - since this targets whichever face map is currently active, not one you name, make sure the map you actually want is set active before this node runs.

And the standing caveat for this whole family: face maps are a deprecated Blender feature, superseded by the general attribute system in newer versions. An error about a missing face-map API here is your bpy version, not a mistake in your graph.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ