Nodes/Avatar Graph/Object Modifier Add
ComfyUI Node

Object Modifier Add

Stack a subsurf, mirror, solidify, or any of 57 modifiers

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Modifier Add
  • BPY_OBJ
  • BPY_OBJ
type

Modifiers are non-destructive edits: you stack them on an object, they change how it looks and behaves, and the raw mesh underneath stays untouched until you apply them. Object_ModifierAdd wraps bpy.ops.object.modifier_add() and puts that stack control into ComfyUI. Pick a type from the dropdown, and the modifier lands on the active object.

In the Avatar Graph flow this is genuinely useful, because character meshes are almost never finished straight off the segmentation node. A SUBSURF smooths the blocky edges of a mesh layer; MIRROR halves your work when a character is symmetric; SOLIDIFY gives a flat 2D card a hint of thickness so it doesn't look like paper when the avatar tilts; ARRAY handles repeating details. The pattern is: add, tune (with whatever the pack exposes), and later decide whether to bake it with Object_ModifierApply or keep it live for export.

The mechanism. The node sets your BPY_OBJ as active and calls the add operator with your type. That dropdown is the whole interface here - and it's big: 57 modifier types, from DATA_TRANSFER through SUBSURF, BOOLEAN, MIRROR, SOLIDIFY, DISPLACE, CLOTH, FLUID, and PARTICLE_SYSTEM. Blender's list, effectively in full.

The input that matters:

  • BPY_OBJ - the object receiving the modifier.
  • type - which modifier to add. For character work you'll spend 90% of your time on SUBSURF, MIRROR, SOLIDIFY, and ARRAY.

Output. BPY_OBJ, passed through. The new modifier is now the last one in the object's stack, ready to be configured by whatever tuning nodes the pack offers or to be acted on by the modifier management nodes (Object_ModifierMoveDown, Object_ModifierApply, and friends).

Installing it. Part of Avatar Graph. ComfyUI Manager → "Avatar Graph", or:

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

Restart with --enable-cors-header; pack pins bpy==3.6.0 and needs Python 3.10.x.

Troubleshooting. A modifier that "does nothing" usually means its parameters need setting - the add node just creates it with defaults, and defaults like a subsurf level of zero or a mirror axis that doesn't match your geometry can look inert. Remember modifiers are non-destructive: if your export looks wrong, the modifier is still in the stack, and you'll need Object_ModifierApply (or removal) to bake or clear it. When in doubt, apply before exporting so the Shape Flow runtime sees the geometry you actually expect.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
typeoptCOMBO57 options: DATA_TRANSFER, MESH_CACHE, MESH_SEQUENCE_CACHE, NORMAL_EDIT, WEIGHTED_NORMAL, UV_PROJECT, +51

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ