All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
40TF_DECLARE_PUBLIC_TOKENS(HdMaterialSchemaTokens, HD_API,
41 HD_MATERIAL_SCHEMA_TOKENS);
42
43//-----------------------------------------------------------------------------
44
45// The Material schema is a container schema that provides the correct
46// material definition per render context.
47//
48// For example, a material may specify several render contexts like the
49// universalRenderContext (""), Renderman ("ri"), Storm ("glslfx"), etc. Each
50// render context will then provide the specific definition for the renderer,
51// which is defined by the MaterialNetwork schema. The universalRenderContext
52// applies to all renderers.
53//
54// See "Custom Code: Schema Methods" section for ASCII art diagram.
55//
56
57class HdMaterialSchema : public HdSchema
58{
59public:
62
63 HdMaterialSchema(HdContainerDataSourceHandle container)
64 : HdSchema(container) {}
65
71 HD_API
72 static HdMaterialSchema GetFromParent(
73 const HdContainerDataSourceHandle &fromParentContainer);
74
76
77// --(BEGIN CUSTOM CODE: Schema Methods)--
78
81
88
99
141
143
144 HD_API
145 HdMaterialNetworkSchema GetMaterialNetwork();
146
147 HD_API
148 HdMaterialNetworkSchema GetMaterialNetwork(TfToken const &context);
149
150// --(END CUSTOM CODE: Schema Methods)--
151
154
156
159
162 HD_API
163 static const TfToken &GetSchemaToken();
164
167 HD_API
168 static const HdDataSourceLocator &GetDefaultLocator();
169
171
174 HD_API
175 static HdContainerDataSourceHandle
176 BuildRetained(
177 size_t count,
178 const TfToken *names,
179 const HdDataSourceBaseHandle *values);
180
182};
183
184PXR_NAMESPACE_CLOSE_SCOPE
185
186#endif
Represents an object that can identify the location of a data source.
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:81