usdrt::UsdShadeOutput

Defined in usdrt/scenegraph/usd/usdShade/output.h

class UsdShadeOutput

This class encapsulates a shader or node-graph output, which is a connectable attribute representing a typed, externally computed value.

Unnamed Group

inline explicit UsdShadeOutput(const UsdAttribute &attr)

Speculative constructor that will produce a valid UsdShadeOutput when attr already represents a shade Output, and produces an invalid UsdShadeOutput otherwise (i.e. the explicit bool conversion operator will return false).

inline TfToken GetFullName() const

Get the name of the attribute associated with the output.

inline TfToken GetBaseName() const

Returns the name of the output.

We call this the base name since it strips off the “outputs:” namespace prefix from the attribute name, and returns it.

inline UsdPrim GetPrim() const

Get the prim that the output belongs to.

inline SdfValueTypeName GetTypeName() const

Get the “scene description” value type name of the attribute associated with the output.

inline const UsdAttribute &GetAttr() const

Explicit UsdAttribute extractor.

inline operator const UsdAttribute&() const

Allow UsdShadeOutput to auto-convert to UsdAttribute, so you can pass a UsdShadeOutput to any function that accepts a UsdAttribute or const-ref thereto.

inline bool IsDefined() const

Return true if the wrapped UsdAttribute is defined, and in addition the attribute is identified as an output.

inline explicit operator bool() const

Return true if this Output is valid for querying and authoring values and metadata, which is identically equivalent to IsDefined().

static inline bool IsOutput(const UsdAttribute &attr)

Test whether a given UsdAttribute represents a valid Output, which implies that creating a UsdShadeOutput from the attribute will succeed.

Success implies that attr.IsDefined() is true.

Public Functions

UsdShadeOutput() = default

Default constructor returns an invalid Output. Exists for container classes.

inline bool ConnectToSource(const UsdShadeInput &sourceInput) const

Connects this Output to the given input, sourceInput.

inline bool ConnectToSource(const UsdShadeOutput &sourceOutput) const

Connects this Output to the given output, sourceOutput.