8 #ifndef PXR_USD_SDR_SHADER_PROPERTY_H
9 #define PXR_USD_SDR_SHADER_PROPERTY_H
33 #define SDR_PROPERTY_TYPE_TOKENS \
35 ((String, "string")) \
38 ((Color4, "color4")) \
40 ((Normal, "normal")) \
41 ((Vector, "vector")) \
42 ((Matrix, "matrix")) \
43 ((Struct, "struct")) \
44 ((Terminal, "terminal")) \
45 ((Vstruct, "vstruct")) \
46 ((Unknown, "unknown"))
51 #define SDR_PROPERTY_METADATA_TOKENS \
55 ((RenderType, "renderType")) \
57 ((Widget, "widget")) \
59 ((Options, "options")) \
60 ((IsDynamicArray, "isDynamicArray")) \
61 ((Connectable, "connectable")) \
63 ((ValidConnectionTypes, "validConnectionTypes")) \
64 ((VstructMemberOf, "vstructMemberOf")) \
65 ((VstructMemberName, "vstructMemberName")) \
66 ((VstructConditionalExpr, "vstructConditionalExpr"))\
67 ((IsAssetIdentifier, "__SDR__isAssetIdentifier"))\
68 ((ImplementationName, "__SDR__implementationName"))\
69 ((SdrUsdDefinitionType, "sdrUsdDefinitionType"))\
70 ((DefaultInput, "__SDR__defaultinput")) \
71 ((Target, "__SDR__target")) \
72 ((Colorspace, "__SDR__colorspace"))
76 #define SDR_PROPERTY_ROLE_TOKENS \
79 #define SDR_PROPERTY_TOKENS \
80 ((PageDelimiter, ":"))
228 bool CanConnectTo(
const SdrShaderProperty& other)
const;
278 SdrShaderProperty&
operator=(
const SdrShaderProperty&) =
delete;
283 friend void SdrShaderNode::_PostProcessProperties();
322 #endif // PXR_USD_SDR_SHADER_PROPERTY_H
VtValue _sdfTypeDefaultValue
SDR_API const TfToken & GetLabel() const
SDR_API const TfToken & GetPage() const
SDR_API bool CanConnectTo(const NdrProperty &other) const override
TfToken _vstructMemberName
#define SDR_PROPERTY_TYPE_TOKENS
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
SDR_API SdrSdfTypeIndicator GetTypeAsSdfType() const override
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 SdrShaderProperty(const TfToken &name, const TfToken &type, const VtValue &defaultValue, bool isOutput, size_t arraySize, const SdrTokenMap &metadata, const SdrTokenMap &hints, const SdrOptionVec &options)
#define SDR_PROPERTY_TOKENS
#define SDR_PROPERTY_ROLE_TOKENS
SDR_API const SdrOptionVec & GetOptions() const
GLuint const GLchar * name
SDR_API std::string GetImplementationName() const
const SdrOptionVec _options
SDR_API bool IsDefaultInput() const
SDR_API bool IsAssetIdentifier() const
#define SDR_PROPERTY_METADATA_TOKENS
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
SdrShaderProperty & operator=(const SdrShaderProperty &)=delete
SDR_API bool IsConnectable() const override
TF_DECLARE_PUBLIC_TOKENS(SdrPropertyTypes, SDR_API, SDR_PROPERTY_TYPE_TOKENS)
#define PXR_NAMESPACE_CLOSE_SCOPE
SDR_API const VtValue & GetDefaultValueAsSdfType() const override
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 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