definePayload#

Fully qualified name: usdex::core::definePayload

pxr::UsdPrim usdex::core::definePayload(
pxr::UsdPrim parent,
const pxr::UsdPrim &source,
std::optional<std::string_view> name = std::nullopt,
)#

Define a payload to a prim as a child of the parent prim.

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

  • source – The payload to add

  • name – The name of the payload. If not provided, uses the source prim’s name

Returns:

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