Nodes/Avatar Graph/Mesh Select Next Item
ComfyUI Node

Mesh Select Next Item

Step the active element forward

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Select Next Item
  • BPY_OBJ
  • BPY_OBJ

Small, easy-to-miss distinction worth getting right up front: this node doesn't change what's selected. It changes which element is the active one - the specific vertex, edge, or face Blender treats as the current reference point, distinct from the broader selection around it. It wraps bpy.ops.mesh.select_next_item, part of Avatar Graph, the pack that runs actual Blender inside ComfyUI's process (via the bpy Python package) to build interactive 2D-to-3D avatars, auto-generating a node for every mesh operator Blender has.

How it works

Blender tracks selection order internally - which element you selected last, effectively. That element is "active," and it's the one several other operators key off directly: Shortest Path Pick's index target, Select Axis's reference vertex, or anything reading the active element's data rather than the selection as a whole. This node advances that active pointer to the next item in the selection's internal order, without adding or removing anything from the selection itself.

Inputs and outputs

The only input is BPY_OBJ - the mesh coming in, with a selection (and therefore an active element) already established upstream. There's nothing else to configure; this is a pure navigation step.

Output is a single BPY_OBJ - the same object, same selection, with the active element moved forward one step.

Where you'd use it

Think of it as the scripted equivalent of Blender's own step-through-selection hotkeys. If you're building a graph that needs to visit selected elements one at a time - driving a per-element operation in sequence rather than acting on the whole selection at once - this and its counterpart, Mesh Select Prev Item, are how you walk that list without a mouse to click each one interactively. It's a niche need, but a real one anywhere this pack's headless, scripted nature stands in for something you'd normally do by hand in Blender's viewport.

Installing it

ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart.

Python 3.10.x is the requirement to nail down first - the bpy package this pack is built on needs that exact minor version, and the README recommends a dedicated conda environment on macOS/Linux (conda create --name comfyui python=3.10) rather than trusting an existing Python install. Windows users get a prebuilt ComfyUI + Python 3.10 zip linked in the README to unzip over their install before adding the pack via Manager. Restart with --enable-cors-header (macOS also wants --force-fp16) for the live 3D preview - without it, the graph still runs fine, you just save the model manually from the pack's Avatar Main Output node instead.

Common issues

Rule out the Python version first if this pack's nodes aren't loading. On this node specifically, the most common confusion is expecting it to change what's selected - it won't. If you're watching a preview and nothing visibly changes after this node runs, that's actually correct behavior; the effect is invisible unless something further downstream specifically reads the active element rather than the full selection. And it needs a selection with a meaningful active element to step through in the first place - running it on an empty selection, or one where "active" was never meaningfully established, doesn't error, it just has nothing to advance.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ