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
158 HD_API
160
163 HD_API
165 GetMaterialNetwork(TfToken const &renderContext) const;
166
170 HD_API
172 TfTokenVector const &renderContexts) const;
173
174 // Find the terminal (surface/volume/displcement) from a given data source locator.
175 HD_API
176 static TfToken
177 GetLocatorTerminal(
178 HdDataSourceLocator const& locator);
179
180 HD_API
181 static TfToken
182 GetLocatorTerminal(
183 HdDataSourceLocator const& locator,
184 TfToken const& renderContext);
185
186 HD_API
187 static TfToken
188 GetLocatorTerminal(
189 HdDataSourceLocator const& locator,
190 TfTokenVector const &Contexts);
191
192// --(END CUSTOM CODE: Schema Methods)--
193
196
198
201
204 HD_API
205 static const TfToken &GetSchemaToken();
206
209 HD_API
211
213
216 HD_API
217 static HdContainerDataSourceHandle
218 BuildRetained(
219 size_t count,
220 const TfToken *names,
221 const HdDataSourceBaseHandle *values);
222
224};
225
226PXR_NAMESPACE_CLOSE_SCOPE
227
228#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 HdMaterialNetworkSchema GetMaterialNetwork(TfToken const &renderContext) const
Return the material network schema for the given render context.
HD_API TfTokenVector GetRenderContexts() const
The following diagram depicts an example scene index prim "Plastic_Material".
HD_API HdMaterialNetworkSchema GetMaterialNetwork() const
Return the material network schema for the universalRenderContext.
HD_API HdMaterialNetworkSchema GetMaterialNetwork(TfTokenVector const &renderContexts) const
Return the first material network schema found among the given list of render contexts,...
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