25 #ifndef PXR_USD_SDR_SHADER_PROPERTY_H
26 #define PXR_USD_SDR_SHADER_PROPERTY_H
43 #define SDR_PROPERTY_TYPE_TOKENS \
45 ((String, "string")) \
48 ((Color4, "color4")) \
50 ((Normal, "normal")) \
51 ((Vector, "vector")) \
52 ((Matrix, "matrix")) \
53 ((Struct, "struct")) \
54 ((Terminal, "terminal")) \
55 ((Vstruct, "vstruct")) \
56 ((Unknown, "unknown"))
61 #define SDR_PROPERTY_METADATA_TOKENS \
65 ((RenderType, "renderType")) \
67 ((Widget, "widget")) \
69 ((Options, "options")) \
70 ((IsDynamicArray, "isDynamicArray")) \
71 ((Connectable, "connectable")) \
73 ((ValidConnectionTypes, "validConnectionTypes")) \
74 ((VstructMemberOf, "vstructMemberOf")) \
75 ((VstructMemberName, "vstructMemberName")) \
76 ((VstructConditionalExpr, "vstructConditionalExpr"))\
77 ((IsAssetIdentifier, "__SDR__isAssetIdentifier"))\
78 ((ImplementationName, "__SDR__implementationName"))\
79 ((SdrUsdDefinitionType, "sdrUsdDefinitionType"))\
80 ((DefaultInput, "__SDR__defaultinput")) \
81 ((Target, "__SDR__target")) \
82 ((Colorspace, "__SDR__colorspace"))
86 #define SDR_PROPERTY_ROLE_TOKENS \
89 #define SDR_PROPERTY_TOKENS \
90 ((PageDelimiter, ":"))
275 SdrShaderProperty&
operator=(
const SdrShaderProperty&) =
delete;
280 friend void SdrShaderNode::_PostProcessProperties();
319 #endif // PXR_USD_SDR_SHADER_PROPERTY_H
VtValue _sdfTypeDefaultValue
SDR_API const TfToken & GetLabel() const
SDR_API const TfToken & GetPage() const
std::vector< TfToken > NdrTokenVec
GLsizei const GLchar *const * string
std::vector< NdrOption > NdrOptionVec
SDR_API bool CanConnectTo(const NdrProperty &other) const override
Determines if this property can be connected to the specified property.
NdrTokenVec _validConnectionTypes
SDR_API SdrShaderProperty(const TfToken &name, const TfToken &type, const VtValue &defaultValue, bool isOutput, size_t arraySize, const NdrTokenMap &metadata, const NdrTokenMap &hints, const NdrOptionVec &options)
SDR_API const NdrTokenVec & GetValidConnectionTypes() const
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.
std::pair< SdfValueTypeName, TfToken > NdrSdfTypeIndicator
SDR_API const TfToken & GetWidget() const
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.
#define SDR_PROPERTY_TOKENS
#define SDR_PROPERTY_ROLE_TOKENS
SDR_API const NdrTokenMap & GetHints() const
GLuint const GLchar * name
SDR_API std::string GetImplementationName() const
SDR_API const NdrSdfTypeIndicator GetTypeAsSdfType() const override
SDR_API bool IsDefaultInput() const
SDR_API bool IsAssetIdentifier() const
const NdrOptionVec _options
#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 bool IsVStructMember() const
Returns true if this field is part of a vstruct.
std::unordered_map< TfToken, std::string, TfToken::HashFunctor > NdrTokenMap
TfToken _vstructConditionalExpr
SDR_API std::string GetHelp() const
The help message assigned to this property, if any.
SDR_API bool IsVStruct() const
Returns true if the field is the head of a vstruct.
SDR_API const NdrOptionVec & GetOptions() const