Loading...
Searching...
No Matches
materialOverrideSchema.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_OVERRIDE_SCHEMA_H
19#define PXR_IMAGING_HD_MATERIAL_OVERRIDE_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24#include "pxr/imaging/hd/schemaTypeDefs.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
30// --(END CUSTOM CODE: Includes)--
31
32PXR_NAMESPACE_OPEN_SCOPE
33
34// --(BEGIN CUSTOM CODE: Declares)--
37// --(END CUSTOM CODE: Declares)--
38
39#define HD_MATERIAL_OVERRIDE_SCHEMA_TOKENS \
40 (materialOverride) \
41 (interfaceValues) \
42 (parameterValues) \
43
44TF_DECLARE_PUBLIC_TOKENS(HdMaterialOverrideSchemaTokens, HD_API,
45 HD_MATERIAL_OVERRIDE_SCHEMA_TOKENS);
46
47//-----------------------------------------------------------------------------
48
49
112{
113public:
116
117 HdMaterialOverrideSchema(HdContainerDataSourceHandle container)
118 : HdSchema(container) {}
119
125 HD_API
127 const HdContainerDataSourceHandle &fromParentContainer);
128
130
131// --(BEGIN CUSTOM CODE: Schema Methods)--
132
136 HD_API
138 const TfToken& shaderNodeName, const TfToken& parameterName) const;
139
140// --(END CUSTOM CODE: Schema Methods)--
141
144
147 HD_API
149
153 HD_API
155
157
160
163 HD_API
164 static const TfToken &GetSchemaToken();
165
168 HD_API
170
172
175
183 HD_API
184 static HdContainerDataSourceHandle
186 const HdContainerDataSourceHandle &interfaceValues,
187 const HdContainerDataSourceHandle &parameterValues
188 );
189
197 {
198 public:
199 HD_API
200 Builder &SetInterfaceValues(
201 const HdContainerDataSourceHandle &interfaceValues);
202 HD_API
203 Builder &SetParameterValues(
204 const HdContainerDataSourceHandle &parameterValues);
205
207 HD_API
208 HdContainerDataSourceHandle Build();
209
210 private:
211 HdContainerDataSourceHandle _interfaceValues;
212 HdContainerDataSourceHandle _parameterValues;
213
214 };
215
217};
218
219PXR_NAMESPACE_CLOSE_SCOPE
220
221#endif
Template class for a schema backed by a container whose children have arbitrary names but an expected...
Represents an object that can identify the location of a data source.
The MaterialNodeParameter schema defines the value data source for the parameter.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
The MaterialOverride schema allows overrides to be made to various parts of materials,...
HD_API HdNodeToInputToMaterialNodeParameterSchema GetParameterValues() const
Contains names of shader nodes whose parameters values are overridden.
static HD_API HdMaterialOverrideSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "materialOverride" from the pa...
HD_API HdMaterialNodeParameterContainerSchema GetInterfaceValues() const
Maps interface names (ie.
HD_API HdMaterialNodeParameterSchema GetParameterOverride(const TfToken &shaderNodeName, const TfToken &parameterName) const
Utility method to retrieve the data source for a parameter edit override.
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 HdContainerDataSourceHandle BuildRetained(const HdContainerDataSourceHandle &interfaceValues, const HdContainerDataSourceHandle &parameterValues)
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