This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SdfPayload Class Reference

Represents a payload and all its meta data. More...

#include <payload.h>

Public Member Functions

SDF_API SdfPayload (const std::string &assetPath=std::string(), const SdfPath &primPath=SdfPath(), const SdfLayerOffset &layerOffset=SdfLayerOffset())
 Create a payload.
 
const std::string & GetAssetPath () const
 Returns the asset path of the layer that the payload uses.
 
void SetAssetPath (const std::string &assetPath)
 Sets a new asset path for the layer the payload uses.
 
const SdfPathGetPrimPath () const
 Returns the scene path of the prim for the payload.
 
void SetPrimPath (const SdfPath &primPath)
 Sets a new prim path for the prim that the payload uses.
 
const SdfLayerOffsetGetLayerOffset () const
 Returns the layer offset associated with the payload.
 
void SetLayerOffset (const SdfLayerOffset &layerOffset)
 Sets a new layer offset.
 
SDF_API bool operator== (const SdfPayload &rhs) const
 Returns whether this payload equals rhs.
 
bool operator!= (const SdfPayload &rhs) const
 
SDF_API bool operator< (const SdfPayload &rhs) const
 Returns whether this payload is less than rhs.
 
bool operator> (const SdfPayload &rhs) const
 
bool operator<= (const SdfPayload &rhs) const
 
bool operator>= (const SdfPayload &rhs) const
 

Friends

size_t hash_value (const SdfPayload &p)
 

Detailed Description

Represents a payload and all its meta data.

A payload represents a prim reference to an external layer. A payload is similar to a prim reference (see SdfReference) with the major difference that payloads are explicitly loaded by the user.

Unloaded payloads represent a boundary that lazy composition and system behaviors will not traverse across, providing a user-visible way to manage the working set of the scene.

Definition at line 41 of file payload.h.

Constructor & Destructor Documentation

◆ SdfPayload()

SDF_API SdfPayload ( const std::string &  assetPath = std::string(),
const SdfPath primPath = SdfPath(),
const SdfLayerOffset layerOffset = SdfLayerOffset() 
)

Create a payload.

See SdfAssetPath for what characters are valid in assetPath. If assetPath contains invalid characters, issue an error and set this payload's asset path to the empty asset path.

Member Function Documentation

◆ GetAssetPath()

const std::string & GetAssetPath ( ) const
inline

Returns the asset path of the layer that the payload uses.

Definition at line 54 of file payload.h.

◆ GetLayerOffset()

const SdfLayerOffset & GetLayerOffset ( ) const
inline

Returns the layer offset associated with the payload.

Definition at line 79 of file payload.h.

◆ GetPrimPath()

const SdfPath & GetPrimPath ( ) const
inline

Returns the scene path of the prim for the payload.

Definition at line 69 of file payload.h.

◆ operator!=()

bool operator!= ( const SdfPayload rhs) const
inline
See also
SdfPayload::operator==

Definition at line 92 of file payload.h.

◆ operator<()

SDF_API bool operator< ( const SdfPayload rhs) const

Returns whether this payload is less than rhs.

The meaning of less than is arbitrary but stable.

◆ operator<=()

bool operator<= ( const SdfPayload rhs) const
inline
See also
SdfPayload::operator<

Definition at line 106 of file payload.h.

◆ operator==()

SDF_API bool operator== ( const SdfPayload rhs) const

Returns whether this payload equals rhs.

◆ operator>()

bool operator> ( const SdfPayload rhs) const
inline
See also
SdfPayload::operator<

Definition at line 101 of file payload.h.

◆ operator>=()

bool operator>= ( const SdfPayload rhs) const
inline
See also
SdfPayload::operator<

Definition at line 111 of file payload.h.

◆ SetAssetPath()

void SetAssetPath ( const std::string &  assetPath)
inline

Sets a new asset path for the layer the payload uses.

See SdfAssetPath for what characters are valid in assetPath. If assetPath contains invalid characters, issue an error and set this payload's asset path to the empty asset path.

Definition at line 62 of file payload.h.

◆ SetLayerOffset()

void SetLayerOffset ( const SdfLayerOffset layerOffset)
inline

Sets a new layer offset.

Definition at line 84 of file payload.h.

◆ SetPrimPath()

void SetPrimPath ( const SdfPath primPath)
inline

Sets a new prim path for the prim that the payload uses.

Definition at line 74 of file payload.h.

Friends And Related Function Documentation

◆ hash_value

size_t hash_value ( const SdfPayload p)
friend

Definition at line 116 of file payload.h.


The documentation for this class was generated from the following file: