Object Modifier Copy
Duplicate a modifier so you can experiment without losing it
- BPY_OBJ
- BPY_OBJ
When you're tuning a modifier and don't want to lose the version that almost worked, you copy it. Object_ModifierCopy wraps bpy.ops.object.modifier_copy(), which duplicates a modifier on the same object. Blender's equivalent is the little duplicate icon next to each modifier in the Properties panel.
In Avatar Graph's world this is a workflow-protection node. Character mesh tuning is trial and error: you add a subsurf, dial it in, and then want to try a stronger version without destroying the good one. Copy the modifier, tweak the copy, and you can compare - or apply one and keep the other for later. It also gives you a cheap way to clone an effect before Object_ModifierApply bakes it, since applying is destructive and there's no undo across graph runs. Keep the copy live while you commit the original.
The mechanism. The node sets your BPY_OBJ as active and calls the operator with the modifier's name. Blender duplicates the stack entry, appending a ".001" to the new copy's name. Only input beyond the object is modifier - the exact name of the modifier to duplicate.
Inputs.
BPY_OBJ- the object whose modifier stack you're working on.modifier- exact name of the modifier to copy. Same string-matching rules as every modifier node in this pack: get the name (including any ".001" suffixes) right or the operator fails.
Output. BPY_OBJ, passed through - now with one more modifier in the stack.
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; the pack pins bpy==3.6.0 and needs Python 3.10.x.
Troubleshooting. The failure modes are all about names: a typo, or copying a modifier that doesn't exist on the object, errors out cleanly. A subtle one - the copied modifier lands below the original in the stack, and stack order changes the result, so an identical-looking copy can behave slightly differently. If you meant to copy the modifier to a different object, that's the separate node Object_ModifierCopyToSelected. This one is strictly same-object duplication.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| modifieropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |