Loading...
Searching...
No Matches
UsdShadeShaderDefUtils Class Reference

This class contains a set of utility functions used for populating the shader registry with shaders definitions specified using UsdShade schemas. More...

#include <shaderDefUtils.h>

Static Public Member Functions

static USDSHADE_API SdrShaderNodeDiscoveryResultVec GetDiscoveryResults (const UsdShadeShader &shaderDef, const std::string &sourceUri)
 Returns the list of SdrShaderNodeDiscoveryResult objects that must be added to the shader registry for the given shader shaderDef, assuming it is found in a shader definition file found by an Sdr discovery plugin.
 
static USDSHADE_API SdrShaderPropertyUniquePtrVec GetProperties (const UsdShadeConnectableAPI &shaderDef)
 Gets all input and output properties of the given shaderDef and translates them into SdrShaderProperties that can be used as the properties for an SdrShaderNode.
 
static USDSHADE_API std::string GetPrimvarNamesMetadataString (const SdrTokenMap metadata, const UsdShadeConnectableAPI &shaderDef)
 Collects all the names of valid primvar inputs of the given metadata and the given shaderDef and returns the string used to represent them in SdrShaderNode metadata.
 

Detailed Description

This class contains a set of utility functions used for populating the shader registry with shaders definitions specified using UsdShade schemas.

Definition at line 28 of file shaderDefUtils.h.

Member Function Documentation

◆ GetDiscoveryResults()

static USDSHADE_API SdrShaderNodeDiscoveryResultVec GetDiscoveryResults ( const UsdShadeShader shaderDef,
const std::string &  sourceUri 
)
static

Returns the list of SdrShaderNodeDiscoveryResult objects that must be added to the shader registry for the given shader shaderDef, assuming it is found in a shader definition file found by an Sdr discovery plugin.

To enable the shaderDef parser to find and parse this shader, sourceUri should have the resolved path to the usd file containing this shader prim.

◆ GetPrimvarNamesMetadataString()

static USDSHADE_API std::string GetPrimvarNamesMetadataString ( const SdrTokenMap  metadata,
const UsdShadeConnectableAPI shaderDef 
)
static

Collects all the names of valid primvar inputs of the given metadata and the given shaderDef and returns the string used to represent them in SdrShaderNode metadata.

◆ GetProperties()

static USDSHADE_API SdrShaderPropertyUniquePtrVec GetProperties ( const UsdShadeConnectableAPI shaderDef)
static

Gets all input and output properties of the given shaderDef and translates them into SdrShaderProperties that can be used as the properties for an SdrShaderNode.


The documentation for this class was generated from the following file: