Nodes/Avatar Graph/Object Geometry Nodes Input Attribute Toggle
ComfyUI Node

Object Geometry Nodes Input Attribute Toggle

Switching a modifier input from a fixed value to mesh data

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Geometry Nodes Input Attribute Toggle
  • BPY_OBJ
  • BPY_OBJ
prop_path
modifier_name

This is a deep-cut node, and it's fine to skip this article entirely if you're not already knee-deep in Geometry Nodes. Object Geometry Nodes Input Attribute Toggle flips one specific input on a Geometry Nodes modifier between two very different data sources: a fixed value you set once, or a named attribute read live from the mesh itself.

How it works

In Blender's Geometry Nodes modifier panel, most inputs have a small toggle icon next to them - click it, and instead of typing a constant number or color, the input starts reading a per-vertex, per-face, or per-point attribute stored on the mesh, letting the node group's behavior vary across the geometry instead of applying uniformly. This node wraps bpy.ops.object.geometry_nodes_input_attribute_toggle(), the operator behind that click.

Two things it needs to know which input, on which modifier, to flip:

  • modifier_name - the exact name of the Geometry Nodes modifier on the object, since an object can carry more than one.
  • prop_path - Blender's internal identifier for the specific input's toggle state, something like ["Input_2_use_attribute"]. That string is tied to how the node group itself names its sockets, so it's not something you can guess reliably without checking the modifier in Blender's own UI first.

Fair warning: driving this from Python rather than clicking it directly in the UI has a documented history of being finicky - setting the underlying property directly (bypassing the operator) is known to leave the toggle stuck. Calling this node the way it's meant to be called is the safer path, but even then, don't be surprised if this one takes some trial and error to get the exact prop_path right.

The inputs and outputs that matter

  • BPY_OBJ (optional) - the object carrying the modifier.
  • modifier_name (string) - which Geometry Nodes modifier to target.
  • prop_path (string) - which input's toggle to flip.

Output: a single BPY_OBJ.

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 is pinned to Python 3.10.x. 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 ComfyUI's startup console for a bpy import error first.

Toggle doesn't seem to take effect - this is a known rough edge with this specific operator when driven outside Blender's UI, not unique to this pack's wrapper. Double-check modifier_name matches exactly, and that prop_path matches the exact identifier format Blender expects for that input (open the modifier in a Blender session first to confirm the correct socket identifier if you're unsure).

Not sure this is the node you need at all - if you just want to assign a specific geometry node group to an object, this isn't that node; it only toggles an existing input's data source. Look at this pack's other geometry-nodes nodes for assignment instead, and treat this one as a fine-tuning tool for once a modifier's already wired up.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
prop_pathoptSTRING
modifier_nameoptSTRING

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ