8 #ifndef PXR_USD_SDR_SHADER_PROPERTY_H
9 #define PXR_USD_SDR_SHADER_PROPERTY_H
29 #define SDR_PROPERTY_TYPE_TOKENS \
31 ((String, "string")) \
34 ((Color4, "color4")) \
36 ((Normal, "normal")) \
37 ((Vector, "vector")) \
38 ((Matrix, "matrix")) \
39 ((Struct, "struct")) \
40 ((Terminal, "terminal")) \
41 ((Vstruct, "vstruct")) \
42 ((Unknown, "unknown"))
281 bool CanConnectTo(
const SdrShaderProperty& other)
const;
333 SdrShaderProperty&
operator=(
const SdrShaderProperty&) =
delete;
338 friend void SdrShaderNode::_PostProcessProperties();
393 #endif // PXR_USD_SDR_SHADER_PROPERTY_H
SdrShaderPropertyMetadata _metadata
SDR_API bool IsDynamicArray() const
Whether this property's array type is dynamically-sized.
VtValue _sdfTypeDefaultValue
SDR_API const TfToken & GetLabel() const
SDR_API const TfToken & GetPage() const
SDR_API const VtValue & GetDefaultValueAsSdfType() const
#define PXR_NAMESPACE_OPEN_SCOPE
SdrShaderNode const * SdrShaderNodeConstPtr
SDR_API SdrSdfTypeIndicator GetTypeAsSdfType() const
const SdrTokenMap & GetMetadata() const
TfToken _vstructMemberName
#define SDR_PROPERTY_TYPE_TOKENS
SDR_API int GetTupleSize() const
SDR_API SdrShaderProperty(const TfToken &name, const TfToken &type, const VtValue &defaultValue, bool isOutput, size_t arraySize, const SdrShaderPropertyMetadata &metadata, const SdrTokenMap &hints, const SdrOptionVec &options)
SDR_API const TfToken & GetVStructMemberOf() const
If this field is part of a vstruct, this is the name of the struct.
SDR_API const TfToken & GetVStructConditionalExpr() const
If this field is part of a vstruct, this is the conditional expression.
SDR_API const TfToken & GetWidget() const
GLint GLint GLsizei GLint GLenum GLenum type
SdrTokenVec _validConnectionTypes
void _SetUsdEncodingVersion(int usdEncodingVersion)
SDR_API const TfToken & GetVStructMemberName() const
If this field is part of a vstruct, this is its name in the struct.
SDR_API int GetArraySize() const
SDR_API const TfToken & GetType() const
Gets the type of the property.
SDR_API bool IsOutput() const
Whether this property is an output.
SDR_API bool IsArray() const
Whether this property's type is an array type.
SDR_API const SdrOptionVec & GetOptions() const
virtual SDR_API ~SdrShaderProperty()
Destructor.
GLuint const GLchar * name
SDR_API std::string GetShownIf() const
SDR_API std::string GetImplementationName() const
const SdrOptionVec _options
SDR_API bool CanConnectTo(const SdrShaderProperty &other) const
Determines if this property can be connected to the specified property.
SDR_API bool IsDefaultInput() const
SDR_API bool IsAssetIdentifier() const
SdrShaderProperty & operator=(const SdrShaderProperty &)=delete
TF_DECLARE_PUBLIC_TOKENS(SdrPropertyTypes, SDR_API, SDR_PROPERTY_TYPE_TOKENS)
SdrTokenMap _legacyMetadata
#define PXR_NAMESPACE_CLOSE_SCOPE
void _ConvertExpressions(const SdrShaderPropertyUniquePtrVec &properties, SdrShaderNodeConstPtr shader)
SDR_API const VtValue & GetDefaultValue() const
SDR_API const SdrTokenMap & GetHints() const
SDR_API bool IsVStructMember() const
Returns true if this field is part of a vstruct.
TfToken _vstructConditionalExpr
SDR_API std::string GetHelp() const
The help message assigned to this property, if any.
std::vector< TfToken > SdrTokenVec
SDR_API bool IsConnectable() const
SDR_API const TfToken & GetName() const
Gets the name of the property.
SDR_API bool IsVStruct() const
Returns true if the field is the head of a vstruct.
std::vector< SdrOption > SdrOptionVec
std::unordered_map< TfToken, std::string, TfToken::HashFunctor > SdrTokenMap
SDR_API const SdrTokenVec & GetValidConnectionTypes() const
SDR_API std::string GetInfoString() const
std::vector< SdrShaderPropertyUniquePtr > SdrShaderPropertyUniquePtrVec
const SdrShaderPropertyMetadata & GetMetadataObject() const
All of the metadata that came from the parse process.