usdRenderProductSchema.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_PRODUCT_SCHEMA_H
32 #define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_PRODUCT_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 USDIMAGINGUSDRENDERPRODUCT_SCHEMA_TOKENS \
43  (__usdRenderProduct) \
44  (resolution) \
45  (pixelAspectRatio) \
46  (aspectRatioConformPolicy) \
47  (dataWindowNDC) \
48  (disableMotionBlur) \
49  (camera) \
50  (productType) \
51  (productName) \
52  (orderedVars) \
53  (namespacedSettings) \
54 
55 TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderProductSchemaTokens, USDIMAGING_API,
56  USDIMAGINGUSDRENDERPRODUCT_SCHEMA_TOKENS);
57 
58 //-----------------------------------------------------------------------------
59 
60 class UsdImagingUsdRenderProductSchema : public HdSchema
61 {
62 public:
63  UsdImagingUsdRenderProductSchema(HdContainerDataSourceHandle container)
64  : HdSchema(container) {}
65 
66  //ACCESSORS
67 
68  USDIMAGING_API
69  HdVec2iDataSourceHandle GetResolution();
70  USDIMAGING_API
71  HdFloatDataSourceHandle GetPixelAspectRatio();
72  USDIMAGING_API
73  HdTokenDataSourceHandle GetAspectRatioConformPolicy();
74  USDIMAGING_API
75  HdVec4fDataSourceHandle GetDataWindowNDC();
76  USDIMAGING_API
77  HdBoolDataSourceHandle GetDisableMotionBlur();
78  USDIMAGING_API
79  HdPathDataSourceHandle GetCamera();
80  USDIMAGING_API
81  HdTokenDataSourceHandle GetProductType();
82  USDIMAGING_API
83  HdTokenDataSourceHandle GetProductName();
84  USDIMAGING_API
85  HdPathArrayDataSourceHandle GetOrderedVars();
86  USDIMAGING_API
87  HdContainerDataSourceHandle GetNamespacedSettings();
88 
89  // RETRIEVING AND CONSTRUCTING
90 
96  USDIMAGING_API
97  static HdContainerDataSourceHandle
98  BuildRetained(
99  const HdVec2iDataSourceHandle &resolution,
100  const HdFloatDataSourceHandle &pixelAspectRatio,
101  const HdTokenDataSourceHandle &aspectRatioConformPolicy,
102  const HdVec4fDataSourceHandle &dataWindowNDC,
103  const HdBoolDataSourceHandle &disableMotionBlur,
104  const HdPathDataSourceHandle &camera,
105  const HdTokenDataSourceHandle &productType,
106  const HdTokenDataSourceHandle &productName,
107  const HdPathArrayDataSourceHandle &orderedVars,
108  const HdContainerDataSourceHandle &namespacedSettings
109  );
110 
117  class Builder
118  {
119  public:
120  USDIMAGING_API
121  Builder &SetResolution(
122  const HdVec2iDataSourceHandle &resolution);
123  USDIMAGING_API
124  Builder &SetPixelAspectRatio(
125  const HdFloatDataSourceHandle &pixelAspectRatio);
126  USDIMAGING_API
127  Builder &SetAspectRatioConformPolicy(
128  const HdTokenDataSourceHandle &aspectRatioConformPolicy);
129  USDIMAGING_API
130  Builder &SetDataWindowNDC(
131  const HdVec4fDataSourceHandle &dataWindowNDC);
132  USDIMAGING_API
133  Builder &SetDisableMotionBlur(
134  const HdBoolDataSourceHandle &disableMotionBlur);
135  USDIMAGING_API
136  Builder &SetCamera(
137  const HdPathDataSourceHandle &camera);
138  USDIMAGING_API
139  Builder &SetProductType(
140  const HdTokenDataSourceHandle &productType);
141  USDIMAGING_API
142  Builder &SetProductName(
143  const HdTokenDataSourceHandle &productName);
144  USDIMAGING_API
145  Builder &SetOrderedVars(
146  const HdPathArrayDataSourceHandle &orderedVars);
147  USDIMAGING_API
148  Builder &SetNamespacedSettings(
149  const HdContainerDataSourceHandle &namespacedSettings);
150 
152  USDIMAGING_API
153  HdContainerDataSourceHandle Build();
154 
155  private:
156  HdVec2iDataSourceHandle _resolution;
157  HdFloatDataSourceHandle _pixelAspectRatio;
158  HdTokenDataSourceHandle _aspectRatioConformPolicy;
159  HdVec4fDataSourceHandle _dataWindowNDC;
160  HdBoolDataSourceHandle _disableMotionBlur;
161  HdPathDataSourceHandle _camera;
162  HdTokenDataSourceHandle _productType;
163  HdTokenDataSourceHandle _productName;
164  HdPathArrayDataSourceHandle _orderedVars;
165  HdContainerDataSourceHandle _namespacedSettings;
166  };
167 
173  USDIMAGING_API
174  static UsdImagingUsdRenderProductSchema GetFromParent(
175  const HdContainerDataSourceHandle &fromParentContainer);
176 
179  USDIMAGING_API
180  static const HdDataSourceLocator &GetDefaultLocator();
181 
182 
187  USDIMAGING_API
188  static const HdDataSourceLocator &GetNamespacedSettingsLocator();
189 
190 };
191 
192 PXR_NAMESPACE_CLOSE_SCOPE
193 
194 #endif
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
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