definePayload#

Fully qualified name: usdex::core::definePayload

pxr::UsdPrim usdex::core::definePayload(
pxr::UsdStagePtr stage,
const pxr::SdfPath &path,
const pxr::UsdPrim &source,
)#

Define a payload to a prim.

This creates a payload prim that targets a prim in another layer (external payload) or the same layer (internal payload) The payload’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 payload with a valid relative path.

For more information, see:

Parameters:
  • stage – The stage on which to define the payload

  • path – The absolute prim path at which to define the payload

  • source – The payload to add

Returns:

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