Nodes/Avatar Graph/Object Curves Random Add
ComfyUI Node

Object Curves Random Add

Blender's hair-curves operator, along for the ride

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Curves Random Add
  • BPY_OBJ
  • location
  • rotation
  • scale
  • BPY_OBJ
align

A direct wrap of bpy.ops.object.curves_random_add() - Blender's operator for adding a new Hair Curves object (the newer, curve-based hair/fur system, distinct from the old particle-hair system) pre-populated with a randomized set of initial strands. It's a real, useful Blender feature for anyone doing 3D character grooming - it just has nothing obviously to do with what this particular pack is for.

Where it fits in Avatar Graph

Avatar Graph (avatechai/avatar-graph-comfyui) rigs a flat character image into a real-time interactive avatar - segmentation, mesh layers, a "Shape Flow" runtime graph, exported through Avatar Main Output. The avatars it builds are flat mesh layers cut from a 2D image, not fully modeled 3D characters, so a hair-curves system doesn't have an obvious role in that pipeline, and the README never mentions it. This node exists because the pack auto-generates a node for essentially every operator in Blender's object.* namespace, and hair curves happened to be one of them - it's along for the ride, not part of the documented workflow.

How it works

Blender's Hair Curves system represents each strand as an actual curve object rather than a particle simulation output. curves_random_add() creates a new Curves object and scatters a randomized starting set of strands across it as a quick starting point - genuinely handy in a Blender grooming workflow, where you'd typically comb, add a surface deformer, and refine from there.

Inputs and outputs

  • location, rotation, scale - the transform for the new Curves object.
  • align - WORLD, VIEW, or CURSOR, matching the same field on other Blender "add" operators in this pack.
  • BPY_OBJ (optional) - present for consistency with the rest of the family, though creating a new object doesn't need one.

Output: BPY_OBJ - the new Curves object.

How to install it

ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manual clone:

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 requirement that actually causes failures: bpy needs Python 3.10.x, nothing newer. Windows gets a prebuilt Python 3.10 ComfyUI zip from the README; on Mac/Linux, set up a dedicated conda env (conda create --name comfyui python=3.10). Restart with --enable-cors-header if you want the live avatar preview to connect to editor.avatech.ai - exports work without it.

Common issues & troubleshooting

Install trouble almost always comes down to Python version - a 3.11/3.12 environment, the default on most current ComfyUI installs, can't load bpy at all. There's also a real report of Avatar Graph leaving a ComfyUI Desktop install badly broken (an oversized logo, an unexpected audio-permission popup) after installation, bad enough that a full reinstall didn't fully clear it - test in a spare, portable ComfyUI instance first if you're not already isolated on 3.10.

Beyond that, there isn't much to troubleshoot on the node itself - it either creates a Curves object or it doesn't, and nothing downstream in Avatar Graph's documented pipeline (mesh layers, shape keys, Shape Flow) is built to consume one. If you landed here expecting it to add hair to a 2D avatar rig, it won't - this is Blender's general-purpose 3D hair tool, unrelated to the flat mesh layers the rest of this pack produces.

Categoryblender

Inputs (5)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
alignoptCOMBO3 options: WORLD, VIEW, CURSOR
locationoptB_VECTOR3
rotationoptB_VECTOR3
scaleoptB_VECTOR3

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ