HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
usdRenderSettingsSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 /* ************************************************************************** */
27 /* ** ** */
28 /* ** This file is generated by a script. ** */
29 /* ** ** */
30 /* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
31 /* ** Edit hdGen/schema.py instead to make changes. ** */
32 /* ** ** */
33 /* ************************************************************************** */
34 
35 #ifndef PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
36 #define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
37 
38 /// \file
39 
41 
42 #include "pxr/imaging/hd/schema.h"
43 
44 // --(BEGIN CUSTOM CODE: Includes)--
45 // --(END CUSTOM CODE: Includes)--
46 
48 
49 // --(BEGIN CUSTOM CODE: Declares)--
50 // --(END CUSTOM CODE: Declares)--
51 
52 #define USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_TOKENS \
53  (__usdRenderSettings) \
54  (resolution) \
55  (pixelAspectRatio) \
56  (aspectRatioConformPolicy) \
57  (dataWindowNDC) \
58  (disableMotionBlur) \
59  (disableDepthOfField) \
60  (camera) \
61  (includedPurposes) \
62  (materialBindingPurposes) \
63  (renderingColorSpace) \
64  (products) \
65  (namespacedSettings) \
66 
67 TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderSettingsSchemaTokens, USDIMAGING_API,
69 
70 //-----------------------------------------------------------------------------
71 
72 
74 {
75 public:
76  /// \name Schema retrieval
77  /// @{
78 
79  UsdImagingUsdRenderSettingsSchema(HdContainerDataSourceHandle container)
80  : HdSchema(container) {}
81 
82  /// Retrieves a container data source with the schema's default name token
83  /// "__usdRenderSettings" from the parent container and constructs a
84  /// UsdImagingUsdRenderSettingsSchema instance.
85  /// Because the requested container data source may not exist, the result
86  /// should be checked with IsDefined() or a bool comparison before use.
89  const HdContainerDataSourceHandle &fromParentContainer);
90 
91  /// @}
92 
93 // --(BEGIN CUSTOM CODE: Schema Methods)--
94 // --(END CUSTOM CODE: Schema Methods)--
95 
96  /// \name Member accessor
97  /// @{
98 
101 
104 
107 
110 
113 
116 
119 
122 
125 
128 
131 
133  HdContainerDataSourceHandle GetNamespacedSettings();
134 
135  /// @}
136 
137  /// \name Schema location
138  /// @{
139 
140  /// Returns a token where the container representing this schema is found in
141  /// a container by default.
143  static const TfToken &GetSchemaToken();
144 
145  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
146  /// where the container representing this schema is found by default.
148  static const HdDataSourceLocator &GetDefaultLocator();
149 
150  /// @}
151 
152  /// \name Data source locators for members
153  ///
154  /// The following methods return an HdDataSourceLocator (relative to the
155  /// prim-level data source) where the data source for a member can be found.
156  ///
157  /// This is often useful for checking intersection against the
158  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
159  /// @{
160 
161  /// Prim-level relative data source locator to locate resolution.
164 
165  /// Prim-level relative data source locator to locate pixelAspectRatio.
168 
169  /// Prim-level relative data source locator to locate aspectRatioConformPolicy.
172 
173  /// Prim-level relative data source locator to locate dataWindowNDC.
176 
177  /// Prim-level relative data source locator to locate disableMotionBlur.
180 
181  /// Prim-level relative data source locator to locate disableDepthOfField.
184 
185  /// Prim-level relative data source locator to locate camera.
187  static const HdDataSourceLocator &GetCameraLocator();
188 
189  /// Prim-level relative data source locator to locate includedPurposes.
192 
193  /// Prim-level relative data source locator to locate materialBindingPurposes.
196 
197  /// Prim-level relative data source locator to locate renderingColorSpace.
200 
201  /// Prim-level relative data source locator to locate products.
203  static const HdDataSourceLocator &GetProductsLocator();
204 
205  /// Prim-level relative data source locator to locate namespacedSettings.
208  /// @}
209 
210  /// \name Schema construction
211  /// @{
212 
213  /// \deprecated Use Builder instead.
214  ///
215  /// Builds a container data source which includes the provided child data
216  /// sources. Parameters with nullptr values are excluded. This is a
217  /// low-level interface. For cases in which it's desired to define
218  /// the container with a sparse set of child fields, the Builder class
219  /// is often more convenient and readable.
221  static HdContainerDataSourceHandle
228  const HdBoolDataSourceHandle &disableDepthOfField,
229  const HdPathDataSourceHandle &camera,
230  const HdTokenArrayDataSourceHandle &includedPurposes,
231  const HdTokenArrayDataSourceHandle &materialBindingPurposes,
232  const HdTokenDataSourceHandle &renderingColorSpace,
233  const HdPathArrayDataSourceHandle &products,
234  const HdContainerDataSourceHandle &namespacedSettings
235  );
236 
237  /// \class UsdImagingUsdRenderSettingsSchema::Builder
238  ///
239  /// Utility class for setting sparse sets of child data source fields to be
240  /// filled as arguments into BuildRetained. Because all setter methods
241  /// return a reference to the instance, this can be used in the "builder
242  /// pattern" form.
243  class Builder
244  {
245  public:
263  const HdBoolDataSourceHandle &disableDepthOfField);
266  const HdPathDataSourceHandle &camera);
269  const HdTokenArrayDataSourceHandle &includedPurposes);
272  const HdTokenArrayDataSourceHandle &materialBindingPurposes);
275  const HdTokenDataSourceHandle &renderingColorSpace);
278  const HdPathArrayDataSourceHandle &products);
281  const HdContainerDataSourceHandle &namespacedSettings);
282 
283  /// Returns a container data source containing the members set thus far.
285  HdContainerDataSourceHandle Build();
286 
287  private:
288  HdVec2iDataSourceHandle _resolution;
289  HdFloatDataSourceHandle _pixelAspectRatio;
290  HdTokenDataSourceHandle _aspectRatioConformPolicy;
291  HdVec4fDataSourceHandle _dataWindowNDC;
292  HdBoolDataSourceHandle _disableMotionBlur;
293  HdBoolDataSourceHandle _disableDepthOfField;
294  HdPathDataSourceHandle _camera;
295  HdTokenArrayDataSourceHandle _includedPurposes;
296  HdTokenArrayDataSourceHandle _materialBindingPurposes;
297  HdTokenDataSourceHandle _renderingColorSpace;
298  HdPathArrayDataSourceHandle _products;
299  HdContainerDataSourceHandle _namespacedSettings;
300 
301  };
302 
303  /// @}
304 };
305 
307 
308 #endif
USDIMAGING_API Builder & SetNamespacedSettings(const HdContainerDataSourceHandle &namespacedSettings)
USDIMAGING_API HdTokenArrayDataSourceHandle GetMaterialBindingPurposes()
USDIMAGING_API HdBoolDataSourceHandle GetDisableMotionBlur()
HdFloatDataSource::Handle HdFloatDataSourceHandle
USDIMAGING_API Builder & SetProducts(const HdPathArrayDataSourceHandle &products)
static USDIMAGING_API const HdDataSourceLocator & GetNamespacedSettingsLocator()
Prim-level relative data source locator to locate namespacedSettings.
#define USDIMAGING_API
Definition: api.h:40
static USDIMAGING_API const HdDataSourceLocator & GetResolutionLocator()
Prim-level relative data source locator to locate resolution.
HdPathArrayDataSource::Handle HdPathArrayDataSourceHandle
USDIMAGING_API Builder & SetCamera(const HdPathDataSourceHandle &camera)
HdVec4fDataSource::Handle HdVec4fDataSourceHandle
static USDIMAGING_API const HdDataSourceLocator & GetDisableDepthOfFieldLocator()
Prim-level relative data source locator to locate disableDepthOfField.
USDIMAGING_API HdBoolDataSourceHandle GetDisableDepthOfField()
HUSD_API const char * aspectRatioConformPolicy()
USDIMAGING_API HdFloatDataSourceHandle GetPixelAspectRatio()
HdTokenArrayDataSource::Handle HdTokenArrayDataSourceHandle
Definition: token.h:87
USDIMAGING_API Builder & SetDisableDepthOfField(const HdBoolDataSourceHandle &disableDepthOfField)
USDIMAGING_API Builder & SetResolution(const HdVec2iDataSourceHandle &resolution)
USDIMAGING_API Builder & SetPixelAspectRatio(const HdFloatDataSourceHandle &pixelAspectRatio)
static USDIMAGING_API const HdDataSourceLocator & GetIncludedPurposesLocator()
Prim-level relative data source locator to locate includedPurposes.
USDIMAGING_API Builder & SetAspectRatioConformPolicy(const HdTokenDataSourceHandle &aspectRatioConformPolicy)
TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderSettingsSchemaTokens, USDIMAGING_API, USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_TOKENS)
static USDIMAGING_API const TfToken & GetSchemaToken()
HdBoolDataSource::Handle HdBoolDataSourceHandle
static USDIMAGING_API const HdDataSourceLocator & GetRenderingColorSpaceLocator()
Prim-level relative data source locator to locate renderingColorSpace.
UsdImagingUsdRenderSettingsSchema(HdContainerDataSourceHandle container)
USDIMAGING_API HdVec4fDataSourceHandle GetDataWindowNDC()
HUSD_API const char * resolution()
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
USDIMAGING_API Builder & SetDisableMotionBlur(const HdBoolDataSourceHandle &disableMotionBlur)
static USDIMAGING_API const HdDataSourceLocator & GetCameraLocator()
Prim-level relative data source locator to locate camera.
USDIMAGING_API HdContainerDataSourceHandle GetNamespacedSettings()
static USDIMAGING_API const HdDataSourceLocator & GetDisableMotionBlurLocator()
Prim-level relative data source locator to locate disableMotionBlur.
HUSD_API const char * pixelAspectRatio()
static USDIMAGING_API const HdDataSourceLocator & GetDataWindowNDCLocator()
Prim-level relative data source locator to locate dataWindowNDC.
USDIMAGING_API Builder & SetMaterialBindingPurposes(const HdTokenArrayDataSourceHandle &materialBindingPurposes)
USDIMAGING_API HdVec2iDataSourceHandle GetResolution()
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
static USDIMAGING_API const HdDataSourceLocator & GetMaterialBindingPurposesLocator()
Prim-level relative data source locator to locate materialBindingPurposes.
USDIMAGING_API HdTokenArrayDataSourceHandle GetIncludedPurposes()
static USDIMAGING_API UsdImagingUsdRenderSettingsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
USDIMAGING_API HdPathDataSourceHandle GetCamera()
USDIMAGING_API Builder & SetIncludedPurposes(const HdTokenArrayDataSourceHandle &includedPurposes)
USDIMAGING_API Builder & SetDataWindowNDC(const HdVec4fDataSourceHandle &dataWindowNDC)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
#define USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_TOKENS
USDIMAGING_API HdTokenDataSourceHandle GetAspectRatioConformPolicy()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API HdTokenDataSourceHandle GetRenderingColorSpace()
static USDIMAGING_API const HdDataSourceLocator & GetAspectRatioConformPolicyLocator()
Prim-level relative data source locator to locate aspectRatioConformPolicy.
static USDIMAGING_API const HdDataSourceLocator & GetProductsLocator()
Prim-level relative data source locator to locate products.
HdVec2iDataSource::Handle HdVec2iDataSourceHandle
USDIMAGING_API HdPathArrayDataSourceHandle GetProducts()
HUSD_API const char * dataWindowNDC()
USDIMAGING_API Builder & SetRenderingColorSpace(const HdTokenDataSourceHandle &renderingColorSpace)
HdPathDataSource::Handle HdPathDataSourceHandle
static USDIMAGING_API const HdDataSourceLocator & GetPixelAspectRatioLocator()
Prim-level relative data source locator to locate pixelAspectRatio.
HdTokenDataSource::Handle HdTokenDataSourceHandle
HUSD_API const char * disableMotionBlur()
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdVec2iDataSourceHandle &resolution, const HdFloatDataSourceHandle &pixelAspectRatio, const HdTokenDataSourceHandle &aspectRatioConformPolicy, const HdVec4fDataSourceHandle &dataWindowNDC, const HdBoolDataSourceHandle &disableMotionBlur, const HdBoolDataSourceHandle &disableDepthOfField, const HdPathDataSourceHandle &camera, const HdTokenArrayDataSourceHandle &includedPurposes, const HdTokenArrayDataSourceHandle &materialBindingPurposes, const HdTokenDataSourceHandle &renderingColorSpace, const HdPathArrayDataSourceHandle &products, const HdContainerDataSourceHandle &namespacedSettings)