Cloning Prims#
Cloning copies a USD subtree already present on the runtime stage to a new prim path. Use it for making additional copies of loaded geometry, sensors, or other stage content without re-authoring the original USD.
Clone destinations must be new absolute prim paths. If the cloned subtree contains relationships, make sure the copied content still points at the desired targets after cloning.
Clone a Subtree#
renderer.clone_usd("/World/Plane", ["/World/PlaneCloneA", "/World/PlaneCloneB"])
prims = renderer.query_prims(attribute_filter_mode=ovrtx.AttributeFilterMode.NONE)
assert "/World/PlaneCloneA" in prims
assert "/World/PlaneCloneB" in prims
ovx_string_t source = ovx_str("/World/Plane");
ovx_string_t targets[] = {
ovx_str("/World/PlaneCloneA"),
ovx_str("/World/PlaneCloneB"),
};
ovrtx_enqueue_result_t eq = ovrtx_clone_usd(renderer_, source, targets, 2);
ASSERT_API_SUCCESS(eq.status);
docs_wait_no_errors(renderer_, eq.op_index);
Async Cloning#
op = renderer.clone_usd_async("/World/Plane", ["/World/PlaneCloneAsync"])
assert op.wait() is True
Notes#
Clone loaded content, then use Writing Transforms to place each copy.
Use Stage Queries to discover source paths before cloning generated or externally supplied scenes.
Use Loading USD references when the content should remain removable by handle or when it has not yet been loaded onto the stage.