This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
14#include "pxr/usd/ndr/nodeDiscoveryResult.h"
15
16#include <string>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
20class UsdShadeShader;
21
28public:
36 USDSHADE_API
37 static NdrNodeDiscoveryResultVec GetNodeDiscoveryResults(
38 const UsdShadeShader &shaderDef,
39 const std::string &sourceUri);
40
44 USDSHADE_API
45 static NdrPropertyUniquePtrVec GetShaderProperties(
46 const UsdShadeConnectableAPI &shaderDef);
47
51 USDSHADE_API
53 const NdrTokenMap metadata,
54 const UsdShadeConnectableAPI &shaderDef);
55};
56
57PXR_NAMESPACE_CLOSE_SCOPE
58
59#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 NdrProperties th...
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 ...
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...
Base class for all USD shaders.
Definition: shader.h:69