UsdShadeConnectionSourceInfo#

Fully qualified name: usdrt::UsdShadeConnectionSourceInfo

struct UsdShadeConnectionSourceInfo#

A compact struct to represent a bundle of information about an upstream source attribute.

Public Functions

UsdShadeConnectionSourceInfo() = default#
inline explicit UsdShadeConnectionSourceInfo(
const UsdShadeConnectableAPI &source_,
const TfToken &sourceName_,
UsdShadeAttributeType sourceType_,
SdfValueTypeName typeName_ = SdfValueTypeName(),
)#
inline explicit UsdShadeConnectionSourceInfo(
const UsdShadeInput &input,
)#
inline explicit UsdShadeConnectionSourceInfo(
const UsdShadeOutput &output,
)#
inline explicit UsdShadeConnectionSourceInfo(
const UsdStageRefPtr &stage,
const SdfPath &sourcePath,
)#

Construct the information for this struct from a property path. The source attribute does not have to exist, but the sourcePath needs to have a valid prefix to identify the sourceType. The source prim needs to exist and be UsdShadeConnectableAPI compatible.

inline bool IsValid() const#

Return true if this source info is valid for setting up a connection.

inline explicit operator bool() const#
inline bool operator==(
const UsdShadeConnectionSourceInfo &other,
) const#
inline bool operator!=(
const UsdShadeConnectionSourceInfo &other,
) const#

Public Members

UsdShadeConnectableAPI source#

source is the connectable prim that produces or contains a value for the given shading attribute.

TfToken sourceName#

sourceName is the name of the shading attribute that is the target of the connection. This excludes any namespace prefix that determines the type of the source (eg, output).

UsdShadeAttributeType sourceType = UsdShadeAttributeType::Invalid#

sourceType is used to indicate the type of the shading attribute that is the target of the connection. The source type is used to determine the namespace prefix that must be attached to sourceName to determine the source full attribute name.

SdfValueTypeName typeName#

typeName, if specified, is the typename of the attribute to create on the source if it doesn’t exist when creating a connection