8 #ifndef PXR_USD_SDR_SHADER_NODE_H
9 #define PXR_USD_SDR_SHADER_NODE_H
26 #include <unordered_map>
33 #define SDR_NODE_METADATA_TOKENS \
34 ((Category, "category")) \
36 ((Departments, "departments")) \
40 ((Primvars, "primvars")) \
41 ((ImplementationName, "__SDR__implementationName"))\
42 ((Target, "__SDR__target")) \
43 ((SdrUsdEncodingVersion, "sdrUsdEncodingVersion")) \
44 ((SdrDefinitionNameFallbackPrefix, "sdrDefinitionNameFallbackPrefix"))
51 #define SDR_NODE_CONTEXT_TOKENS \
52 ((Pattern, "pattern")) \
53 ((Surface, "surface")) \
54 ((Volume, "volume")) \
55 ((Displacement, "displacement")) \
57 ((DisplayFilter, "displayFilter")) \
58 ((LightFilter, "lightFilter")) \
59 ((PixelFilter, "pixelFilter")) \
60 ((SampleFilter, "sampleFilter"))
62 #define SDR_NODE_ROLE_TOKENS \
63 ((Primvar, "primvar")) \
64 ((Texture, "texture")) \
89 const std::string&
name,
93 const std::string& definitionURI,
94 const std::string& implementationURI,
97 const std::string &sourceCode = std::string());
104 const std::string& name,
108 const std::string& definitionURI,
109 const std::string& implementationURI,
112 const std::string &sourceCode = std::string());
248 std::vector<SdrIdentifier>,
264 const std::vector<SdrShaderNodeConstPtr> &shaderNodes);
272 void _PostProcessProperties();
295 void _InitializePrimvars();
303 #endif // PXR_USD_SDR_SHADER_NODE_H
SdrPropertyMap _shaderInputs
SdrPropertyMap _shaderOutputs
SDR_API const SdrTokenVec & GetPages() const
SDR_API const SdrTokenVec & GetPrimvars() const
SDR_API const TfToken & GetCategory() const
SDR_API const TfToken & GetLabel() const
SdrVersion GetShaderVersion() const
Return the version of the node.
SDR_API SdrShaderPropertyConstPtr GetShaderInput(const TfToken &inputName) const
SdrTokenVec _primvarNamingProperties
Functor to use for hash maps from tokens to other things.
SDR_API const SdrTokenVec & GetAdditionalPrimvarProperties() const
SDR_API const SdrTokenVec & GetDepartments() const
The departments this node is associated with, if any.
std::vector< NdrPropertyUniquePtr > NdrPropertyUniquePtrVec
SDR_API std::string GetHelp() const
The help message assigned to this node, if any.
SDR_API std::string GetImplementationName() const
SDR_API SdrShaderPropertyConstPtr GetDefaultInput() const
SdrShaderPropertyMap SdrPropertyMap
SDR_API const SdrTokenVec & GetShaderOutputNames() const
Get an ordered list of all the output names on this shader node.
std::unordered_map< TfToken, std::vector< SdrIdentifier >, TfToken::HashFunctor > ComplianceResults
GLuint const GLchar * name
SdrShaderProperty const * SdrShaderPropertyConstPtr
GT_API const UT_StringHolder version
SDR_API SdrTokenVec GetPropertyNamesForPage(const std::string &pageName) const
SDR_API const SdrTokenVec & GetShaderInputNames() const
Get an ordered list of all the input names on this shader node.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
static SDR_API ComplianceResults CheckPropertyCompliance(const std::vector< SdrShaderNodeConstPtr > &shaderNodes)
SDR_API SdrTokenVec GetAssetIdentifierInputNames() const
#define SDR_NODE_ROLE_TOKENS
#define PXR_NAMESPACE_CLOSE_SCOPE
SDR_API SdrShaderPropertyConstPtr GetShaderOutput(const TfToken &outputName) const
SDR_API SdrTokenVec GetAllVstructNames() const
Gets all vstructs that are present in the shader.
std::unordered_map< TfToken, std::string, TfToken::HashFunctor > NdrTokenMap
std::vector< TfToken > SdrTokenVec
#define SDR_NODE_CONTEXT_TOKENS
#define SDR_NODE_METADATA_TOKENS
SDR_API SdrShaderNode(const NdrIdentifier &identifier, const NdrVersion &version, const std::string &name, const TfToken &family, const TfToken &context, const TfToken &sourceType, const std::string &definitionURI, const std::string &implementationURI, NdrPropertyUniquePtrVec &&properties, const NdrTokenMap &metadata=NdrTokenMap(), const std::string &sourceCode=std::string())
std::unordered_map< TfToken, std::string, TfToken::HashFunctor > SdrTokenMap
std::vector< SdrShaderPropertyUniquePtr > SdrShaderPropertyUniquePtrVec
SDR_API SdrVersion NdrToSdrVersion(NdrVersion version)
TF_DECLARE_PUBLIC_TOKENS(SdrNodeMetadata, SDR_API, SDR_NODE_METADATA_TOKENS)
SDR_API std::string GetRole() const