Loading...
Searching...
No Matches
shaderDefUtils.h
1//
2// Copyright 2018 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_USD_SHADE_SHADER_DEF_UTILS_H
8#define PXR_USD_USD_SHADE_SHADER_DEF_UTILS_H
9
10#include "pxr/pxr.h"
11#include "pxr/usd/usdShade/api.h"
13
16
17#include <string>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21class UsdShadeShader;
22
29public:
41 USDSHADE_API
42 static NdrNodeDiscoveryResultVec GetNodeDiscoveryResults(
43 const UsdShadeShader &shaderDef,
44 const std::string &sourceUri);
45
54 USDSHADE_API
55 static SdrShaderNodeDiscoveryResultVec GetDiscoveryResults(
56 const UsdShadeShader &shaderDef,
57 const std::string &sourceUri);
58
65 USDSHADE_API
66 static NdrPropertyUniquePtrVec GetShaderProperties(
67 const UsdShadeConnectableAPI &shaderDef);
68
72 USDSHADE_API
73 static SdrShaderPropertyUniquePtrVec GetProperties(
74 const UsdShadeConnectableAPI &shaderDef);
75
79 USDSHADE_API
81 const SdrTokenMap metadata,
82 const UsdShadeConnectableAPI &shaderDef);
83};
84
85PXR_NAMESPACE_CLOSE_SCOPE
86
87#endif
UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and mak...
This class contains a set of utility functions used for populating the shader registry with shaders d...
static USDSHADE_API NdrPropertyUniquePtrVec GetShaderProperties(const UsdShadeConnectableAPI &shaderDef)
Gets all input and output properties of the given shaderDef and translates them into SdrShaderPropert...
static USDSHADE_API NdrNodeDiscoveryResultVec GetNodeDiscoveryResults(const UsdShadeShader &shaderDef, const std::string &sourceUri)
Returns the list of SdrShaderNodeDiscoveryResult objects that must be added to the shader registry fo...
static USDSHADE_API SdrShaderPropertyUniquePtrVec GetProperties(const UsdShadeConnectableAPI &shaderDef)
Gets all input and output properties of the given shaderDef and translates them into SdrShaderPropert...
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 fo...
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 retu...
Base class for all USD shaders.
Definition: shader.h:69