USD exporter aborts on duplicate prim paths from identically named objects in collections
0 reputation · 01 Jan 2021, 16:28 UTC
0 reputation · 01 Jan 2021, 16:28 UTC
Blender's built-in USD exporter (io_scene_usd) halts with a "Duplicate prim path detected" error when a collection contains multiple objects that share the same name. USD stages require unique prim paths, so the exporter treats identically named objects as conflicts and aborts the entire export rather than continuing.
Unlike the Alembic and FBX exporters, which automatically append numeric suffixes (e.g., Cube, Cube_001) to resolve name collisions, the USD exporter currently offers no automatic disambiguation. Developer discussions indicate three unresolved directions: strict failure (current), optional auto-rename with user notification, or delegation to external pipeline tools. Auto-rename risks breaking downstream workflows that depend on stable prim paths as identifiers, while point instancer–based instancing—though capable of representing duplicates as instances of a single prototype—requires manual Geometry Nodes or Collection Instance setup.
This is expected behavior, not a bug you can toggle off. USD requires every prim path in a stage to be unique, and Blender's io_scene_usd exporter maps object names directly onto prim paths. When two objects would land on the same path (for example, both becoming /root/Cube), the exporter aborts rather than silently renaming one of them. Unlike the Alembic and FBX exporters, it has no automatic numeric-suffix disambiguation, so the collision has to be resolved before export — by you or by a script.
Blender normally enforces unique object names inside a single .blend file by auto-appending .001, so genuine collisions usually come from one of these sources:
That origin matters, because it determines which fix is available to you.
The direct fix: give every exported object a name that produces a unique prim path, then re-export. If the objects are linked from a library and cannot be renamed in place, rename them in the source file, or rename the parent collection/empty that scopes their path — changing the parent path disambiguates the children without touching the objects themselves.
If the identically named objects are genuinely the same thing repeated, collection instances or Geometry Nodes instancing map naturally onto USD point instancers: one prototype prim plus instance transforms. This eliminates the path collision entirely and produces a much smaller file. It does require restructuring the scene, so it is a design decision, not a quick patch.
For large scenes, a small Python pass before export can detect collisions under the same parent path, rename, and log what it changed:
import bpy
seen = {}
for obj in bpy.context.scene.objects:
key = (obj.parent.name if obj.parent else "", obj.name)
if key in seen:
obj.name = f"{obj.name}_dup"
print(f"renamed conflicting object -> {obj.name}")
seen[key] = objKeep the log: downstream consumers (lookdev, layout, shading assignments) often treat prim paths as stable identifiers, and any rename you perform must be reconcilable.
Re-export and open the resulting .usda in a text editor — search for the previously colliding path and confirm each prim appears exactly once. Also check the USD export options panel in your Blender version before scripting anything: exporter options are version-sensitive, and newer releases may add collision-handling or instancing settings that make a workaround unnecessary. Behavior described here reflects established exporter behavior as of recent Blender 3.x/4.x releases; confirm against the version you run.
Auto-rename as a default would trade a hard failure for a silent identifier change — arguably worse for pipelines that key off prim paths. An opt-in rename option with a written mapping report is the safer middle ground. Automatic point-instancer generation is the most USD-native answer but only valid when duplicates are truly identical, which the exporter cannot safely infer. Until Blender settles this, explicit renaming plus instancing where applicable remains the reliable path.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.