defineReference#

Fully qualified name: usdex::core::defineReference

pxr::UsdPrim usdex::core::defineReference(
pxr::UsdPrim parent,
const std::string &name,
const std::string &sourceIdentifier,
std::optional<pxr::SdfPath> primPath = std::nullopt,
)#

Define a reference prim as a child of parent that references an external USD file.

This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.

Parameters:
  • parent – The parent prim to add the reference to

  • name – The name of the reference

  • sourceIdentifier – The identifier of the external USD file to reference

  • primPath – Absolute prim path in the external USD file for the root prim of this reference. If not provided, uses the default prim’s path

Returns:

The newly created reference prim. Returns an invalid prim on error.