usdRenderSettingsSchema.h
1 //
2 // Copyright 2022 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 //
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 
34 #include "pxr/usdImaging/usdImaging/api.h"
35 
36 #include "pxr/imaging/hd/schema.h"
37 
38 PXR_NAMESPACE_OPEN_SCOPE
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,
57  USDIMAGINGUSDRENDERSETTINGS_SCHEMA_TOKENS);
58 
59 //-----------------------------------------------------------------------------
60 
61 class UsdImagingUsdRenderSettingsSchema : public HdSchema
62 {
63 public:
64  UsdImagingUsdRenderSettingsSchema(HdContainerDataSourceHandle container)
65  : HdSchema(container) {}
66 
67  //ACCESSORS
68 
69  USDIMAGING_API
70  HdVec2iDataSourceHandle GetResolution();
71  USDIMAGING_API
72  HdFloatDataSourceHandle GetPixelAspectRatio();
73  USDIMAGING_API
74  HdTokenDataSourceHandle GetAspectRatioConformPolicy();
75  USDIMAGING_API
76  HdVec4fDataSourceHandle GetDataWindowNDC();
77  USDIMAGING_API
78  HdBoolDataSourceHandle GetDisableMotionBlur();
79  USDIMAGING_API
80  HdPathDataSourceHandle GetCamera();
81  USDIMAGING_API
82  HdTokenArrayDataSourceHandle GetIncludedPurposes();
83  USDIMAGING_API
84  HdTokenArrayDataSourceHandle GetMaterialBindingPurposes();
85  USDIMAGING_API
86  HdTokenDataSourceHandle GetRenderingColorSpace();
87  USDIMAGING_API
88  HdPathArrayDataSourceHandle GetProducts();
89  USDIMAGING_API
90  HdContainerDataSourceHandle GetNamespacedSettings();
91 
92  // RETRIEVING AND CONSTRUCTING
93 
99  USDIMAGING_API
100  static HdContainerDataSourceHandle
101  BuildRetained(
102  const HdVec2iDataSourceHandle &resolution,
103  const HdFloatDataSourceHandle &pixelAspectRatio,
104  const HdTokenDataSourceHandle &aspectRatioConformPolicy,
105  const HdVec4fDataSourceHandle &dataWindowNDC,
106  const HdBoolDataSourceHandle &disableMotionBlur,
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 
121  class Builder
122  {
123  public:
124  USDIMAGING_API
125  Builder &SetResolution(
126  const HdVec2iDataSourceHandle &resolution);
127  USDIMAGING_API
128  Builder &SetPixelAspectRatio(
129  const HdFloatDataSourceHandle &pixelAspectRatio);
130  USDIMAGING_API
131  Builder &SetAspectRatioConformPolicy(
132  const HdTokenDataSourceHandle &aspectRatioConformPolicy);
133  USDIMAGING_API
134  Builder &SetDataWindowNDC(
135  const HdVec4fDataSourceHandle &dataWindowNDC);
136  USDIMAGING_API
137  Builder &SetDisableMotionBlur(
138  const HdBoolDataSourceHandle &disableMotionBlur);
139  USDIMAGING_API
140  Builder &SetCamera(
141  const HdPathDataSourceHandle &camera);
142  USDIMAGING_API
143  Builder &SetIncludedPurposes(
144  const HdTokenArrayDataSourceHandle &includedPurposes);
145  USDIMAGING_API
146  Builder &SetMaterialBindingPurposes(
147  const HdTokenArrayDataSourceHandle &materialBindingPurposes);
148  USDIMAGING_API
149  Builder &SetRenderingColorSpace(
150  const HdTokenDataSourceHandle &renderingColorSpace);
151  USDIMAGING_API
152  Builder &SetProducts(
153  const HdPathArrayDataSourceHandle &products);
154  USDIMAGING_API
155  Builder &SetNamespacedSettings(
156  const HdContainerDataSourceHandle &namespacedSettings);
157 
159  USDIMAGING_API
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 
181  USDIMAGING_API
182  static UsdImagingUsdRenderSettingsSchema GetFromParent(
183  const HdContainerDataSourceHandle &fromParentContainer);
184 
187  USDIMAGING_API
188  static const HdDataSourceLocator &GetDefaultLocator();
189 
190 
195  USDIMAGING_API
196  static const HdDataSourceLocator &GetResolutionLocator();
197 
202  USDIMAGING_API
203  static const HdDataSourceLocator &GetPixelAspectRatioLocator();
204 
209  USDIMAGING_API
210  static const HdDataSourceLocator &GetAspectRatioConformPolicyLocator();
211 
216  USDIMAGING_API
217  static const HdDataSourceLocator &GetDataWindowNDCLocator();
218 
223  USDIMAGING_API
224  static const HdDataSourceLocator &GetDisableMotionBlurLocator();
225 
230  USDIMAGING_API
231  static const HdDataSourceLocator &GetCameraLocator();
232 
237  USDIMAGING_API
238  static const HdDataSourceLocator &GetIncludedPurposesLocator();
239 
244  USDIMAGING_API
245  static const HdDataSourceLocator &GetMaterialBindingPurposesLocator();
246 
251  USDIMAGING_API
252  static const HdDataSourceLocator &GetRenderingColorSpaceLocator();
253 
258  USDIMAGING_API
259  static const HdDataSourceLocator &GetProductsLocator();
260 
265  USDIMAGING_API
266  static const HdDataSourceLocator &GetNamespacedSettingsLocator();
267 
268 };
269 
270 PXR_NAMESPACE_CLOSE_SCOPE
271 
272 #endif
Represents an object that can identify the location of a data source.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:43
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...