definePayload#
Fully qualified name: usdex::core::definePayload
- pxr::UsdPrim usdex::core::definePayload(
- pxr::UsdPrim parent,
- const std::string &name,
- const std::string &sourceIdentifier,
- std::optional<pxr::SdfPath> primPath = std::nullopt,
Define a payload prim as a child of
parentthat 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 payload to
name – The name of the payload
sourceIdentifier – The identifier of the external USD file to payload
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 payload prim. Returns an invalid prim on error.