Nodes/Avatar Graph/Object Duplicate
ComfyUI Node

Object Duplicate

The general-purpose copy node behind Avatar Graph's other duplicate tools

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Duplicate
  • BPY_OBJ
  • BPY_OBJ
linkedfalse
mode

This is the base operator that Blender's other duplicate shortcuts are built from - Shift+D and Alt+D are both this same operator, just called with different default arguments. Object Duplicate exposes those arguments directly, which makes it the most flexible of the three duplicate nodes this pack ships, at the cost of being slightly less "just works" than the other two.

How it works

It wraps bpy.ops.object.duplicate(), and the two parameters it exposes are exactly the two that distinguish Blender's different duplicate behaviors:

  • linked - off (the default) gives you an independent copy: its own mesh data, editable without touching the original. On gives you a linked duplicate - the copy shares the same underlying mesh data-block as the source, so editing the geometry on either one edits both. That's the same trick behind repeated props or accessories in a scene that should all update together if you tweak the shape later.
  • mode - which transform runs immediately after the duplicate is created. TRANSLATION is the default and matches ordinary Shift+D behavior (duplicate, then move). The other choices mirror Blender's other transform tools (ROTATION, RESIZE, SHEAR, and a long tail of more specialized modes) for duplicating straight into a rotate or resize instead. Unless you have a specific reason otherwise, leave it on TRANSLATION.

The inputs and outputs that matter

  • BPY_OBJ - the object to duplicate.
  • linked (bool, default false) - independent copy vs. shared mesh data.
  • mode (enum, default TRANSLATION) - which transform the duplicate is created mid-way through.

Output: a single BPY_OBJ, the new duplicate.

This pack also ships two more specific duplicate nodes: Object_DuplicateMove (fixed to the non-linked Shift+D behavior) and Object_DuplicateMoveLinked (fixed to the linked Alt+D behavior). Reach for those when you just want the standard shortcut with no decisions to make; reach for this one specifically when you need to choose linked yourself, or a transform mode other than the default translation.

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 hard to Python 3.10.x. Windows gets a prebuilt Python-3.10 ComfyUI zip from the README; macOS/Linux should use a dedicated conda create --name comfyui python=3.10 rather than an existing newer environment. Add --enable-cors-header on restart (plus --force-fp16 on Mac) for the live avatar preview; without it, everything still runs, you just export .glb/.gltf instead of previewing in-browser.

Common issues & troubleshooting

Node failing to load traces to the Python-version pin almost every time - check ComfyUI's startup console for a bpy import error before assuming anything's wrong with your graph.

Edited the copy and the original changed too - that's linked=true doing exactly what it's supposed to. If you didn't mean to share mesh data, set linked to false and re-duplicate; there's no way to "unlink" an existing linked duplicate from this node alone (Blender's Object menu has a dedicated "Make Single User" step for that, which this pack's node set doesn't currently wrap here).

Duplicate lands somewhere unexpected - mode controls which transform runs immediately after duplication, and Blender's default translate behavior generally expects to be followed by mouse movement (which a scripted node call can't provide); in a headless graph, the duplicate is typically created directly on top of the original. Follow this node with an explicit transform node if you need the copy placed at a specific offset.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
linkedoptBOOLEANfalse
modeoptCOMBO33 options: INIT, DUMMY, TRANSLATION, ROTATION, RESIZE, SKIN_RESIZE, +27

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ