HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
renderSettingsSchema.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 //
7 ////////////////////////////////////////////////////////////////////////
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_SETTINGS_SCHEMA_H
19 #define PXR_IMAGING_HD_RENDER_SETTINGS_SCHEMA_H
20 
21 /// \file
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 
31 // --(BEGIN CUSTOM CODE: Includes)--
32 // --(END CUSTOM CODE: Includes)--
33 
35 
36 // --(BEGIN CUSTOM CODE: Declares)--
37 // --(END CUSTOM CODE: Declares)--
38 
39 #define HD_RENDER_SETTINGS_SCHEMA_TOKENS \
40  (renderSettings) \
41  (namespacedSettings) \
42  (active) \
43  (camera) \
44  (disableMotionBlur) \
45  (disableDepthOfField) \
46  (renderProducts) \
47  (includedPurposes) \
48  (materialBindingPurposes) \
49  (renderingColorSpace) \
50  (unionedSamplingInterval) \
51 
52 TF_DECLARE_PUBLIC_TOKENS(HdRenderSettingsSchemaTokens, HD_API,
54 
55 //-----------------------------------------------------------------------------
56 
57 
58 /// \class HdRenderSettingsSchema
59 ///
61 {
62 public:
63  /// \name Schema retrieval
64  /// @{
65 
66  HdRenderSettingsSchema(HdContainerDataSourceHandle container)
67  : HdSchema(container) {}
68 
69  /// Retrieves a container data source with the schema's default name token
70  /// "renderSettings" from the parent container and constructs a
71  /// HdRenderSettingsSchema instance.
72  /// Because the requested container data source may not exist, the result
73  /// should be checked with IsDefined() or a bool comparison before use.
74  HD_API
76  const HdContainerDataSourceHandle &fromParentContainer);
77 
78  /// @}
79 
80 // --(BEGIN CUSTOM CODE: Schema Methods)--
81 
82  /// This locator is to pass along dirtying of the currentFrame locator
83  /// on the Scene Globals Scene Index through the render Settings prim.
84  HD_API
85  static const HdDataSourceLocator &GetFrameLocator();
86 
87 // --(END CUSTOM CODE: Schema Methods)--
88 
89  /// \name Member accessor
90  /// @{
91 
92  HD_API
94 
95  HD_API
97 
98  HD_API
100 
101  HD_API
103 
104  HD_API
106 
107  HD_API
109 
110  HD_API
112 
113  HD_API
115 
116  HD_API
118 
119  /// Frame-relative time interval representing the sampling window for data
120  /// relevant to motion blur. Renderers can use this interval when querying
121  /// time-sampled data (e.g., xforms, points, velocities, ...) to simulate
122  /// motion blur effects. Note: This closely relates to the (frame-
123  /// relative) shutter interval of a camera specified via shutter open and
124  /// close times and is expected to span the union of the shutter intervals
125  /// of cameras used in generating the render artifacts.
126  HD_API
128 
129  /// @}
130 
131  /// \name Schema location
132  /// @{
133 
134  /// Returns a token where the container representing this schema is found in
135  /// a container by default.
136  HD_API
137  static const TfToken &GetSchemaToken();
138 
139  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
140  /// where the container representing this schema is found by default.
141  HD_API
142  static const HdDataSourceLocator &GetDefaultLocator();
143 
144  /// @}
145 
146  /// \name Data source locators for members
147  ///
148  /// The following methods return an HdDataSourceLocator (relative to the
149  /// prim-level data source) where the data source for a member can be found.
150  ///
151  /// This is often useful for checking intersection against the
152  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
153  /// @{
154 
155  /// Prim-level relative data source locator to locate namespacedSettings.
156  HD_API
158 
159  /// Prim-level relative data source locator to locate active.
160  HD_API
161  static const HdDataSourceLocator &GetActiveLocator();
162 
163  /// Prim-level relative data source locator to locate camera.
164  HD_API
165  static const HdDataSourceLocator &GetCameraLocator();
166 
167  /// Prim-level relative data source locator to locate disableMotionBlur.
168  HD_API
170 
171  /// Prim-level relative data source locator to locate disableDepthOfField.
172  HD_API
174 
175  /// Prim-level relative data source locator to locate renderProducts.
176  HD_API
178 
179  /// Prim-level relative data source locator to locate includedPurposes.
180  HD_API
182 
183  /// Prim-level relative data source locator to locate materialBindingPurposes.
184  HD_API
186 
187  /// Prim-level relative data source locator to locate renderingColorSpace.
188  HD_API
190 
191  /// Prim-level relative data source locator to locate unionedSamplingInterval.
192  HD_API
194  /// @}
195 
196  /// \name Schema construction
197  /// @{
198 
199  /// \deprecated Use Builder instead.
200  ///
201  /// Builds a container data source which includes the provided child data
202  /// sources. Parameters with nullptr values are excluded. This is a
203  /// low-level interface. For cases in which it's desired to define
204  /// the container with a sparse set of child fields, the Builder class
205  /// is often more convenient and readable.
206  HD_API
207  static HdContainerDataSourceHandle
209  const HdContainerDataSourceHandle &namespacedSettings,
211  const HdPathDataSourceHandle &camera,
213  const HdBoolDataSourceHandle &disableDepthOfField,
214  const HdVectorDataSourceHandle &renderProducts,
215  const HdTokenArrayDataSourceHandle &includedPurposes,
216  const HdTokenArrayDataSourceHandle &materialBindingPurposes,
217  const HdTokenDataSourceHandle &renderingColorSpace,
218  const HdVec2dDataSourceHandle &unionedSamplingInterval
219  );
220 
221  /// \class HdRenderSettingsSchema::Builder
222  ///
223  /// Utility class for setting sparse sets of child data source fields to be
224  /// filled as arguments into BuildRetained. Because all setter methods
225  /// return a reference to the instance, this can be used in the "builder
226  /// pattern" form.
227  class Builder
228  {
229  public:
230  HD_API
232  const HdContainerDataSourceHandle &namespacedSettings);
233  HD_API
236  HD_API
238  const HdPathDataSourceHandle &camera);
239  HD_API
242  HD_API
244  const HdBoolDataSourceHandle &disableDepthOfField);
245  HD_API
247  const HdVectorDataSourceHandle &renderProducts);
248  HD_API
250  const HdTokenArrayDataSourceHandle &includedPurposes);
251  HD_API
253  const HdTokenArrayDataSourceHandle &materialBindingPurposes);
254  HD_API
256  const HdTokenDataSourceHandle &renderingColorSpace);
257  HD_API
259  const HdVec2dDataSourceHandle &unionedSamplingInterval);
260 
261  /// Returns a container data source containing the members set thus far.
262  HD_API
263  HdContainerDataSourceHandle Build();
264 
265  private:
266  HdContainerDataSourceHandle _namespacedSettings;
267  HdBoolDataSourceHandle _active;
268  HdPathDataSourceHandle _camera;
269  HdBoolDataSourceHandle _disableMotionBlur;
270  HdBoolDataSourceHandle _disableDepthOfField;
271  HdVectorDataSourceHandle _renderProducts;
272  HdTokenArrayDataSourceHandle _includedPurposes;
273  HdTokenArrayDataSourceHandle _materialBindingPurposes;
274  HdTokenDataSourceHandle _renderingColorSpace;
275  HdVec2dDataSourceHandle _unionedSamplingInterval;
276 
277  };
278 
279  /// @}
280 };
281 
283 
284 #endif
HD_API HdSampledDataSourceContainerSchema GetNamespacedSettings() const
#define HD_RENDER_SETTINGS_SCHEMA_TOKENS
HD_API Builder & SetActive(const HdBoolDataSourceHandle &active)
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
static HD_API const HdDataSourceLocator & GetFrameLocator()
static HD_API const HdDataSourceLocator & GetDisableMotionBlurLocator()
Prim-level relative data source locator to locate disableMotionBlur.
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
HD_API HdTokenDataSourceHandle GetRenderingColorSpace() const
#define HD_API
Definition: api.h:23
HdRenderSettingsSchema(HdContainerDataSourceHandle container)
static HD_API const HdDataSourceLocator & GetRenderProductsLocator()
Prim-level relative data source locator to locate renderProducts.
HD_API HdPathDataSourceHandle GetCamera() const
static HD_API const TfToken & GetSchemaToken()
TF_DECLARE_PUBLIC_TOKENS(HdRenderSettingsSchemaTokens, HD_API, HD_RENDER_SETTINGS_SCHEMA_TOKENS)
HD_API Builder & SetRenderingColorSpace(const HdTokenDataSourceHandle &renderingColorSpace)
static HD_API const HdDataSourceLocator & GetDefaultLocator()
static HD_API HdContainerDataSourceHandle BuildRetained(const HdContainerDataSourceHandle &namespacedSettings, const HdBoolDataSourceHandle &active, const HdPathDataSourceHandle &camera, const HdBoolDataSourceHandle &disableMotionBlur, const HdBoolDataSourceHandle &disableDepthOfField, const HdVectorDataSourceHandle &renderProducts, const HdTokenArrayDataSourceHandle &includedPurposes, const HdTokenArrayDataSourceHandle &materialBindingPurposes, const HdTokenDataSourceHandle &renderingColorSpace, const HdVec2dDataSourceHandle &unionedSamplingInterval)
static HD_API const HdDataSourceLocator & GetDisableDepthOfFieldLocator()
Prim-level relative data source locator to locate disableDepthOfField.
HdTokenArrayDataSource::Handle HdTokenArrayDataSourceHandle
HD_API Builder & SetCamera(const HdPathDataSourceHandle &camera)
static HD_API const HdDataSourceLocator & GetIncludedPurposesLocator()
Prim-level relative data source locator to locate includedPurposes.
Definition: token.h:70
static HD_API const HdDataSourceLocator & GetRenderingColorSpaceLocator()
Prim-level relative data source locator to locate renderingColorSpace.
static HD_API const HdDataSourceLocator & GetMaterialBindingPurposesLocator()
Prim-level relative data source locator to locate materialBindingPurposes.
HD_API HdBoolDataSourceHandle GetDisableMotionBlur() const
HdBoolDataSource::Handle HdBoolDataSourceHandle
HD_API Builder & SetUnionedSamplingInterval(const HdVec2dDataSourceHandle &unionedSamplingInterval)
static HD_API const HdDataSourceLocator & GetActiveLocator()
Prim-level relative data source locator to locate active.
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
HD_API Builder & SetMaterialBindingPurposes(const HdTokenArrayDataSourceHandle &materialBindingPurposes)
HD_API HdBoolDataSourceHandle GetActive() const
HD_API HdTokenArrayDataSourceHandle GetIncludedPurposes() const
HD_API Builder & SetIncludedPurposes(const HdTokenArrayDataSourceHandle &includedPurposes)
HD_API HdVec2dDataSourceHandle GetUnionedSamplingInterval() const
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
static HD_API const HdDataSourceLocator & GetUnionedSamplingIntervalLocator()
Prim-level relative data source locator to locate unionedSamplingInterval.
HD_API Builder & SetNamespacedSettings(const HdContainerDataSourceHandle &namespacedSettings)
HD_API Builder & SetDisableMotionBlur(const HdBoolDataSourceHandle &disableMotionBlur)
HD_API HdBoolDataSourceHandle GetDisableDepthOfField() const
static HD_API HdRenderSettingsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
HdPathDataSource::Handle HdPathDataSourceHandle
HD_API HdRenderProductVectorSchema GetRenderProducts() const
HdTokenDataSource::Handle HdTokenDataSourceHandle
HD_API Builder & SetDisableDepthOfField(const HdBoolDataSourceHandle &disableDepthOfField)
static HD_API const HdDataSourceLocator & GetCameraLocator()
Prim-level relative data source locator to locate camera.
static HD_API const HdDataSourceLocator & GetNamespacedSettingsLocator()
Prim-level relative data source locator to locate namespacedSettings.
HD_API HdTokenArrayDataSourceHandle GetMaterialBindingPurposes() const
HUSD_API const char * disableMotionBlur()
HdVec2dDataSource::Handle HdVec2dDataSourceHandle
HD_API Builder & SetRenderProducts(const HdVectorDataSourceHandle &renderProducts)