Loading...
Searching...
No Matches
UsdShadeConnectionSourceInfo Struct Reference

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

#include <connectableAPI.h>

Public Member Functions

 UsdShadeConnectionSourceInfo (UsdShadeConnectableAPI const &source_, TfToken const &sourceName_, UsdShadeAttributeType sourceType_, SdfValueTypeName typeName_=SdfValueTypeName())
 
 UsdShadeConnectionSourceInfo (UsdShadeInput const &input)
 
 UsdShadeConnectionSourceInfo (UsdShadeOutput const &output)
 
USDSHADE_API UsdShadeConnectionSourceInfo (UsdStagePtr const &stage, SdfPath const &sourcePath)
 Construct the information for this struct from a property path.
 
bool IsValid () const
 Return true if this source info is valid for setting up a connection.
 
 operator bool () const
 
bool operator== (UsdShadeConnectionSourceInfo const &other) const
 
bool operator!= (const UsdShadeConnectionSourceInfo &other) const
 

Public Attributes

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.
 
UsdShadeAttributeType sourceType = UsdShadeAttributeType::Invalid
 sourceType is used to indicate the type of the shading attribute that is the target of the connection.
 
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
 

Detailed Description

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

Definition at line 754 of file connectableAPI.h.

Constructor & Destructor Documentation

◆ UsdShadeConnectionSourceInfo() [1/4]

UsdShadeConnectionSourceInfo ( UsdShadeConnectableAPI const &  source_,
TfToken const &  sourceName_,
UsdShadeAttributeType  sourceType_,
SdfValueTypeName  typeName_ = SdfValueTypeName() 
)
inlineexplicit

Definition at line 772 of file connectableAPI.h.

◆ UsdShadeConnectionSourceInfo() [2/4]

UsdShadeConnectionSourceInfo ( UsdShadeInput const &  input)
inlineexplicit

Definition at line 782 of file connectableAPI.h.

◆ UsdShadeConnectionSourceInfo() [3/4]

UsdShadeConnectionSourceInfo ( UsdShadeOutput const &  output)
inlineexplicit

Definition at line 788 of file connectableAPI.h.

◆ UsdShadeConnectionSourceInfo() [4/4]

USDSHADE_API UsdShadeConnectionSourceInfo ( UsdStagePtr const &  stage,
SdfPath const &  sourcePath 
)
explicit

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

Member Function Documentation

◆ IsValid()

bool IsValid ( ) const
inline

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

Definition at line 804 of file connectableAPI.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Definition at line 814 of file connectableAPI.h.

◆ operator!=()

bool operator!= ( const UsdShadeConnectionSourceInfo other) const
inline

Definition at line 823 of file connectableAPI.h.

◆ operator==()

bool operator== ( UsdShadeConnectionSourceInfo const &  other) const
inline

Definition at line 817 of file connectableAPI.h.

Member Data Documentation

◆ source

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

Definition at line 757 of file connectableAPI.h.

◆ sourceName

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).

Definition at line 761 of file connectableAPI.h.

◆ sourceType

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.

Definition at line 766 of file connectableAPI.h.

◆ typeName

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

Definition at line 769 of file connectableAPI.h.


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