Loading...
Searching...
No Matches
materialSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_MATERIAL_SCHEMA_H
19#define PXR_IMAGING_HD_MATERIAL_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34// --(END CUSTOM CODE: Declares)--
35
36#define HD_MATERIAL_SCHEMA_TOKENS \
37 (material) \
38 ((universalRenderContext, "")) \
39 ((_universalRenderContextToken, "universalRenderContext")) \
40 ((all, "__all")) \
41 (terminals) \
42 (surface) \
43 (displacement) \
44 (volume) \
45
46TF_DECLARE_PUBLIC_TOKENS(HdMaterialSchemaTokens, HD_API,
47 HD_MATERIAL_SCHEMA_TOKENS);
48
49//-----------------------------------------------------------------------------
50
51
66{
67public:
70
71 HdMaterialSchema(HdContainerDataSourceHandle container)
72 : HdSchema(container) {}
73
79 HD_API
81 const HdContainerDataSourceHandle &fromParentContainer);
82
84
85// --(BEGIN CUSTOM CODE: Schema Methods)--
86
89
96
107
149
151
154 HD_API
156
157 HD_API
158 HdMaterialNetworkSchema GetMaterialNetwork();
159
160 HD_API
161 HdMaterialNetworkSchema GetMaterialNetwork(TfToken const &renderContext);
162
163 HD_API
164 HdMaterialNetworkSchema GetMaterialNetwork(
165 TfTokenVector const &renderContexts);
166
167 // Find the terminal (surface/volume/displcement) from a given data source locator.
168 HD_API
169 static TfToken
170 GetLocatorTerminal(
171 HdDataSourceLocator const& locator);
172
173 HD_API
174 static TfToken
175 GetLocatorTerminal(
176 HdDataSourceLocator const& locator,
177 TfToken const& renderContext);
178
179 HD_API
180 static TfToken
181 GetLocatorTerminal(
182 HdDataSourceLocator const& locator,
183 TfTokenVector const &Contexts);
184
185// --(END CUSTOM CODE: Schema Methods)--
186
189
191
194
197 HD_API
198 static const TfToken &GetSchemaToken();
199
202 HD_API
204
206
209 HD_API
210 static HdContainerDataSourceHandle
211 BuildRetained(
212 size_t count,
213 const TfToken *names,
214 const HdDataSourceBaseHandle *values);
215
217};
218
219PXR_NAMESPACE_CLOSE_SCOPE
220
221#endif
Represents an object that can identify the location of a data source.
The MaterialNetwork schema is a container schema that defines a material for a specific render contex...
The Material schema is a container schema that provides the correct material definition per render co...
static HD_API HdMaterialSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "material" from the parent con...
HD_API TfTokenVector GetRenderContexts() const
The following diagram depicts an example scene index prim "Plastic_Material".
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
static HD_API const HdDataSourceLocator & GetDefaultLocator()
Returns an HdDataSourceLocator (relative to the prim-level data source) where the container represent...
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440