Loading...
Searching...
No Matches
renderSettingDescriptorSchema.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_RENDER_SETTING_DESCRIPTOR_SCHEMA_H
19#define PXR_IMAGING_HD_RENDER_SETTING_DESCRIPTOR_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_RENDER_SETTING_DESCRIPTOR_SCHEMA_TOKENS \
36 (renderSettingDescriptor) \
37 (name) \
38 (defaultValue) \
39
40TF_DECLARE_PUBLIC_TOKENS(HdRenderSettingDescriptorSchemaTokens, HD_API,
41 HD_RENDER_SETTING_DESCRIPTOR_SCHEMA_TOKENS);
42
43//-----------------------------------------------------------------------------
44
45
53{
54public:
57
58 HdRenderSettingDescriptorSchema(HdContainerDataSourceHandle container)
59 : HdSchema(container) {}
60
66 HD_API
68 const HdContainerDataSourceHandle &fromParentContainer);
69
71
72// --(BEGIN CUSTOM CODE: Schema Methods)--
73// --(END CUSTOM CODE: Schema Methods)--
74
77
80 HD_API
81 HdStringDataSourceHandle GetName() const;
82
83 HD_API
84 HdSampledDataSourceHandle GetDefaultValue() const;
85
87
90
93 HD_API
94 static const TfToken &GetSchemaToken();
95
97
100
108 HD_API
109 static HdContainerDataSourceHandle
111 const HdStringDataSourceHandle &name,
112 const HdSampledDataSourceHandle &defaultValue
113 );
114
121 class Builder
122 {
123 public:
124 HD_API
125 Builder &SetName(
126 const HdStringDataSourceHandle &name);
127 HD_API
128 Builder &SetDefaultValue(
129 const HdSampledDataSourceHandle &defaultValue);
130
132 HD_API
133 HdContainerDataSourceHandle Build();
134
135 private:
136 HdStringDataSourceHandle _name;
137 HdSampledDataSourceHandle _defaultValue;
138
139 };
140
142};
143
144PXR_NAMESPACE_CLOSE_SCOPE
145
146#endif
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.
Describes render setting advertised by a renderer through HdRendererPlugin::GetSceneIndexCreateArgs,...
static HD_API HdRenderSettingDescriptorSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
Retrieves a container data source with the schema's default name token "renderSettingDescriptor" from...
HD_API HdStringDataSourceHandle GetName() const
Human-readable name of the render setting, suitable for display in a UI.
static HD_API HdContainerDataSourceHandle BuildRetained(const HdStringDataSourceHandle &name, const HdSampledDataSourceHandle &defaultValue)
static HD_API const TfToken & GetSchemaToken()
Returns a token where the container representing this schema is found in a container by default.
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:81
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.