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
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 737 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 755 of file connectableAPI.h.

◆ UsdShadeConnectionSourceInfo() [2/4]

UsdShadeConnectionSourceInfo ( UsdShadeInput const &  input)
inlineexplicit

Definition at line 765 of file connectableAPI.h.

◆ UsdShadeConnectionSourceInfo() [3/4]

UsdShadeConnectionSourceInfo ( UsdShadeOutput const &  output)
inlineexplicit

Definition at line 771 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 787 of file connectableAPI.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Definition at line 797 of file connectableAPI.h.

◆ operator!=()

bool operator!= ( const UsdShadeConnectionSourceInfo other) const
inline

Definition at line 806 of file connectableAPI.h.

◆ operator==()

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

Definition at line 800 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 740 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 744 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 749 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 752 of file connectableAPI.h.


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