defineReference#
Fully qualified name: usdex::core::defineReference
- pxr::UsdPrim usdex::core::defineReference(
- pxr::UsdStagePtr stage,
- const pxr::SdfPath &path,
- const pxr::UsdPrim &source,
Define a reference to a prim.
This creates a reference prim that targets a prim in another layer (external reference) or the same layer (internal reference). The reference’s assetPath will be set to the relative identifier between the stage’s edit target and the source’s stage if it’s an external reference with a valid relative path.
For more information, see:
https://openusd.org/release/glossary.html#usdglossary-references
https://openusd.org/release/api/class_usd_references.html#details
- Parameters:
stage – The stage on which to define the reference
path – The absolute prim path at which to define the reference
source – The prim to reference
- Returns:
The newly created reference prim. Returns an invalid prim on error.