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 /* ** This file is generated by a script. Do not edit directly. Edit ** */
28 /* ** defs.py or the (*)Schema.template.h files to make changes. ** */
29 /* ************************************************************************** */
30 
31 #ifndef PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
32 #define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
33 
35 
36 #include "pxr/imaging/hd/schema.h"
37 
39 
40 //-----------------------------------------------------------------------------
41 
42 #define USDIMAGINGUSDRENDERSETTINGS_SCHEMA_TOKENS \
43  (__usdRenderSettings) \
44  (resolution) \
45  (pixelAspectRatio) \
46  (aspectRatioConformPolicy) \
47  (dataWindowNDC) \
48  (disableMotionBlur) \
49  (camera) \
50  (includedPurposes) \
51  (materialBindingPurposes) \
52  (renderingColorSpace) \
53  (products) \
54  (namespacedSettings) \
55 
56 TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderSettingsSchemaTokens, USDIMAGING_API,
58 
59 //-----------------------------------------------------------------------------
60 
62 {
63 public:
64  UsdImagingUsdRenderSettingsSchema(HdContainerDataSourceHandle container)
65  : HdSchema(container) {}
66 
67  //ACCESSORS
68 
90  HdContainerDataSourceHandle GetNamespacedSettings();
91 
92  // RETRIEVING AND CONSTRUCTING
93 
94  /// Builds a container data source which includes the provided child data
95  /// sources. Parameters with nullptr values are excluded. This is a
96  /// low-level interface. For cases in which it's desired to define
97  /// the container with a sparse set of child fields, the Builder class
98  /// is often more convenient and readable.
100  static HdContainerDataSourceHandle
107  const HdPathDataSourceHandle &camera,
108  const HdTokenArrayDataSourceHandle &includedPurposes,
109  const HdTokenArrayDataSourceHandle &materialBindingPurposes,
110  const HdTokenDataSourceHandle &renderingColorSpace,
111  const HdPathArrayDataSourceHandle &products,
112  const HdContainerDataSourceHandle &namespacedSettings
113  );
114 
115  /// \class UsdImagingUsdRenderSettingsSchema::Builder
116  ///
117  /// Utility class for setting sparse sets of child data source fields to be
118  /// filled as arguments into BuildRetained. Because all setter methods
119  /// return a reference to the instance, this can be used in the "builder
120  /// pattern" form.
121  class Builder
122  {
123  public:
141  const HdPathDataSourceHandle &camera);
144  const HdTokenArrayDataSourceHandle &includedPurposes);
147  const HdTokenArrayDataSourceHandle &materialBindingPurposes);
150  const HdTokenDataSourceHandle &renderingColorSpace);
153  const HdPathArrayDataSourceHandle &products);
156  const HdContainerDataSourceHandle &namespacedSettings);
157 
158  /// Returns a container data source containing the members set thus far.
160  HdContainerDataSourceHandle Build();
161 
162  private:
163  HdVec2iDataSourceHandle _resolution;
164  HdFloatDataSourceHandle _pixelAspectRatio;
165  HdTokenDataSourceHandle _aspectRatioConformPolicy;
166  HdVec4fDataSourceHandle _dataWindowNDC;
167  HdBoolDataSourceHandle _disableMotionBlur;
168  HdPathDataSourceHandle _camera;
169  HdTokenArrayDataSourceHandle _includedPurposes;
170  HdTokenArrayDataSourceHandle _materialBindingPurposes;
171  HdTokenDataSourceHandle _renderingColorSpace;
172  HdPathArrayDataSourceHandle _products;
173  HdContainerDataSourceHandle _namespacedSettings;
174  };
175 
176  /// Retrieves a container data source with the schema's default name token
177  /// "__usdRenderSettings" from the parent container and constructs a
178  /// UsdImagingUsdRenderSettingsSchema instance.
179  /// Because the requested container data source may not exist, the result
180  /// should be checked with IsDefined() or a bool comparison before use.
183  const HdContainerDataSourceHandle &fromParentContainer);
184 
185  /// Returns a token where the container representing this schema is found in
186  /// a container by default.
188  static const TfToken &GetSchemaToken();
189 
190  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
191  /// where the container representing this schema is found by default.
193  static const HdDataSourceLocator &GetDefaultLocator();
194 
195 
196  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
197  /// where the resolution data source can be found.
198  /// This is often useful for checking intersection against the
199  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
202 
203  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
204  /// where the pixelaspectratio data source can be found.
205  /// This is often useful for checking intersection against the
206  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
209 
210  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
211  /// where the aspectratioconformpolicy data source can be found.
212  /// This is often useful for checking intersection against the
213  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
216 
217  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
218  /// where the datawindowndc data source can be found.
219  /// This is often useful for checking intersection against the
220  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
223 
224  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
225  /// where the disablemotionblur data source can be found.
226  /// This is often useful for checking intersection against the
227  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
230 
231  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
232  /// where the camera data source can be found.
233  /// This is often useful for checking intersection against the
234  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
236  static const HdDataSourceLocator &GetCameraLocator();
237 
238  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
239  /// where the includedpurposes data source can be found.
240  /// This is often useful for checking intersection against the
241  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
244 
245  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
246  /// where the materialbindingpurposes data source can be found.
247  /// This is often useful for checking intersection against the
248  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
251 
252  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
253  /// where the renderingcolorspace data source can be found.
254  /// This is often useful for checking intersection against the
255  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
258 
259  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
260  /// where the products data source can be found.
261  /// This is often useful for checking intersection against the
262  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
264  static const HdDataSourceLocator &GetProductsLocator();
265 
266  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
267  /// where the namespacedsettings data source can be found.
268  /// This is often useful for checking intersection against the
269  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
272 
273 };
274 
276 
277 #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()
#define USDIMAGING_API
Definition: api.h:40
static USDIMAGING_API const HdDataSourceLocator & GetResolutionLocator()
HdPathArrayDataSource::Handle HdPathArrayDataSourceHandle
USDIMAGING_API Builder & SetCamera(const HdPathDataSourceHandle &camera)
HdVec4fDataSource::Handle HdVec4fDataSourceHandle
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdVec2iDataSourceHandle &resolution, const HdFloatDataSourceHandle &pixelAspectRatio, const HdTokenDataSourceHandle &aspectRatioConformPolicy, const HdVec4fDataSourceHandle &dataWindowNDC, const HdBoolDataSourceHandle &disableMotionBlur, const HdPathDataSourceHandle &camera, const HdTokenArrayDataSourceHandle &includedPurposes, const HdTokenArrayDataSourceHandle &materialBindingPurposes, const HdTokenDataSourceHandle &renderingColorSpace, const HdPathArrayDataSourceHandle &products, const HdContainerDataSourceHandle &namespacedSettings)
HUSD_API const char * aspectRatioConformPolicy()
USDIMAGING_API HdFloatDataSourceHandle GetPixelAspectRatio()
HdTokenArrayDataSource::Handle HdTokenArrayDataSourceHandle
Definition: token.h:87
USDIMAGING_API Builder & SetResolution(const HdVec2iDataSourceHandle &resolution)
USDIMAGING_API Builder & SetPixelAspectRatio(const HdFloatDataSourceHandle &pixelAspectRatio)
static USDIMAGING_API const HdDataSourceLocator & GetIncludedPurposesLocator()
USDIMAGING_API Builder & SetAspectRatioConformPolicy(const HdTokenDataSourceHandle &aspectRatioConformPolicy)
static USDIMAGING_API const TfToken & GetSchemaToken()
HdBoolDataSource::Handle HdBoolDataSourceHandle
static USDIMAGING_API const HdDataSourceLocator & GetRenderingColorSpaceLocator()
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()
USDIMAGING_API HdContainerDataSourceHandle GetNamespacedSettings()
static USDIMAGING_API const HdDataSourceLocator & GetDisableMotionBlurLocator()
HUSD_API const char * pixelAspectRatio()
static USDIMAGING_API const HdDataSourceLocator & GetDataWindowNDCLocator()
USDIMAGING_API Builder & SetMaterialBindingPurposes(const HdTokenArrayDataSourceHandle &materialBindingPurposes)
USDIMAGING_API HdVec2iDataSourceHandle GetResolution()
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
static USDIMAGING_API const HdDataSourceLocator & GetMaterialBindingPurposesLocator()
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)
TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderSettingsSchemaTokens, USDIMAGING_API, USDIMAGINGUSDRENDERSETTINGS_SCHEMA_TOKENS)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1441
USDIMAGING_API HdTokenDataSourceHandle GetAspectRatioConformPolicy()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API HdTokenDataSourceHandle GetRenderingColorSpace()
static USDIMAGING_API const HdDataSourceLocator & GetAspectRatioConformPolicyLocator()
static USDIMAGING_API const HdDataSourceLocator & GetProductsLocator()
HdVec2iDataSource::Handle HdVec2iDataSourceHandle
#define USDIMAGINGUSDRENDERSETTINGS_SCHEMA_TOKENS
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()
HdTokenDataSource::Handle HdTokenDataSourceHandle
HUSD_API const char * disableMotionBlur()