omni.usd.duplicate_prim(stage: Stage, prim_path: Union[str, Path], path_to: Union[str, Path], duplicate_layers: bool = True)

Duplicate prim.

  • stage (Usd.Stage) – Stage handle.

  • prim_path (Union[str, Sdf.Path]) – Prim path.

  • path_to (Union[str, Sdf.Path]) – Copy to path.

  • duplicate_layers (bool) – True if it’s to duplicate this prim in all local layers. False if it’s to duplicate this prim to the current edit target. And it depends on whether the prim is defined or not. If it’s not defined, it will only copy the opinions in the current edit target if it exists. Otherwise, it will copy the def to the current edit target, even it’s from other layers instead of the current edit target. If you want to collapse all overrides inside all local layers for the prim, see omni.usd.stitch_prim_specs for reference.


True if successful, or false otherwise.