24 #ifndef PXR_USD_USD_SHADE_SHADER_DEF_UTILS_H
25 #define PXR_USD_USD_SHADE_SHADER_DEF_UTILS_H
28 #include "pxr/usd/usdShade/api.h"
31 #include "pxr/usd/ndr/nodeDiscoveryResult.h"
35 PXR_NAMESPACE_OPEN_SCOPE
79 const std::string &sourceUri);
93 const NdrTokenMap metadata,
97 PXR_NAMESPACE_CLOSE_SCOPE
static USDSHADE_API std::string GetPrimvarNamesMetadataString(const NdrTokenMap metadata, const UsdShadeConnectableAPI &shaderDef)
Collects all the names of valid primvar inputs of the given metadata and the given shaderDef and retu...
static USDSHADE_API bool SplitShaderIdentifier(const TfToken &identifier, TfToken *familyName, TfToken *implementationName, NdrVersion *version)
Given a shader's identifier token, computes the corresponding SdrShaderNode's family name...
Token for efficient comparison, assignment, and hashing of known strings.
This class contains a set of utility functions used for populating the shader registry with shaders d...
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
static USDSHADE_API NdrNodeDiscoveryResultVec GetNodeDiscoveryResults(const UsdShadeShader &shaderDef, const std::string &sourceUri)
Returns the list of NdrNodeDiscoveryResult objects that must be added to the shader registry for the ...
Base class for all USD shaders.
static USDSHADE_API NdrPropertyUniquePtrVec GetShaderProperties(const UsdShadeConnectableAPI &shaderDef)
Gets all input and output properties of the given shaderDef and translates them into NdrProperties th...