HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
usdRenderProductSchema.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_PRODUCT_SCHEMA_H
36 #define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_PRODUCT_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_PRODUCT_SCHEMA_TOKENS \
53  (__usdRenderProduct) \
54  (resolution) \
55  (pixelAspectRatio) \
56  (aspectRatioConformPolicy) \
57  (dataWindowNDC) \
58  (disableMotionBlur) \
59  (disableDepthOfField) \
60  (camera) \
61  (productType) \
62  (productName) \
63  (orderedVars) \
64  (namespacedSettings) \
65 
66 TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderProductSchemaTokens, USDIMAGING_API,
68 
69 //-----------------------------------------------------------------------------
70 
71 
73 {
74 public:
75  /// \name Schema retrieval
76  /// @{
77 
78  UsdImagingUsdRenderProductSchema(HdContainerDataSourceHandle container)
79  : HdSchema(container) {}
80 
81  /// Retrieves a container data source with the schema's default name token
82  /// "__usdRenderProduct" from the parent container and constructs a
83  /// UsdImagingUsdRenderProductSchema instance.
84  /// Because the requested container data source may not exist, the result
85  /// should be checked with IsDefined() or a bool comparison before use.
88  const HdContainerDataSourceHandle &fromParentContainer);
89 
90  /// @}
91 
92 // --(BEGIN CUSTOM CODE: Schema Methods)--
93 // --(END CUSTOM CODE: Schema Methods)--
94 
95  /// \name Member accessor
96  /// @{
97 
100 
103 
106 
109 
112 
115 
118 
121 
124 
127 
129  HdContainerDataSourceHandle GetNamespacedSettings();
130 
131  /// @}
132 
133  /// \name Schema location
134  /// @{
135 
136  /// Returns a token where the container representing this schema is found in
137  /// a container by default.
139  static const TfToken &GetSchemaToken();
140 
141  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
142  /// where the container representing this schema is found by default.
144  static const HdDataSourceLocator &GetDefaultLocator();
145 
146  /// @}
147 
148  /// \name Data source locators for members
149  ///
150  /// The following methods return an HdDataSourceLocator (relative to the
151  /// prim-level data source) where the data source for a member can be found.
152  ///
153  /// This is often useful for checking intersection against the
154  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
155  /// @{
156 
157  /// Prim-level relative data source locator to locate namespacedSettings.
160  /// @}
161 
162  /// \name Schema construction
163  /// @{
164 
165  /// \deprecated Use Builder instead.
166  ///
167  /// Builds a container data source which includes the provided child data
168  /// sources. Parameters with nullptr values are excluded. This is a
169  /// low-level interface. For cases in which it's desired to define
170  /// the container with a sparse set of child fields, the Builder class
171  /// is often more convenient and readable.
173  static HdContainerDataSourceHandle
180  const HdBoolDataSourceHandle &disableDepthOfField,
181  const HdPathDataSourceHandle &camera,
184  const HdPathArrayDataSourceHandle &orderedVars,
185  const HdContainerDataSourceHandle &namespacedSettings
186  );
187 
188  /// \class UsdImagingUsdRenderProductSchema::Builder
189  ///
190  /// Utility class for setting sparse sets of child data source fields to be
191  /// filled as arguments into BuildRetained. Because all setter methods
192  /// return a reference to the instance, this can be used in the "builder
193  /// pattern" form.
194  class Builder
195  {
196  public:
214  const HdBoolDataSourceHandle &disableDepthOfField);
217  const HdPathDataSourceHandle &camera);
226  const HdPathArrayDataSourceHandle &orderedVars);
229  const HdContainerDataSourceHandle &namespacedSettings);
230 
231  /// Returns a container data source containing the members set thus far.
233  HdContainerDataSourceHandle Build();
234 
235  private:
236  HdVec2iDataSourceHandle _resolution;
237  HdFloatDataSourceHandle _pixelAspectRatio;
238  HdTokenDataSourceHandle _aspectRatioConformPolicy;
239  HdVec4fDataSourceHandle _dataWindowNDC;
240  HdBoolDataSourceHandle _disableMotionBlur;
241  HdBoolDataSourceHandle _disableDepthOfField;
242  HdPathDataSourceHandle _camera;
243  HdTokenDataSourceHandle _productType;
244  HdTokenDataSourceHandle _productName;
245  HdPathArrayDataSourceHandle _orderedVars;
246  HdContainerDataSourceHandle _namespacedSettings;
247 
248  };
249 
250  /// @}
251 };
252 
254 
255 #endif
USDIMAGING_API HdVec4fDataSourceHandle GetDataWindowNDC()
USDIMAGING_API Builder & SetDisableMotionBlur(const HdBoolDataSourceHandle &disableMotionBlur)
USDIMAGING_API HdBoolDataSourceHandle GetDisableDepthOfField()
USDIMAGING_API HdTokenDataSourceHandle GetProductName()
HdFloatDataSource::Handle HdFloatDataSourceHandle
#define USDIMAGING_API
Definition: api.h:40
static USDIMAGING_API const TfToken & GetSchemaToken()
UsdImagingUsdRenderProductSchema(HdContainerDataSourceHandle container)
HdPathArrayDataSource::Handle HdPathArrayDataSourceHandle
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
static USDIMAGING_API UsdImagingUsdRenderProductSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
USDIMAGING_API HdContainerDataSourceHandle GetNamespacedSettings()
HdVec4fDataSource::Handle HdVec4fDataSourceHandle
HUSD_API const char * aspectRatioConformPolicy()
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
USDIMAGING_API HdFloatDataSourceHandle GetPixelAspectRatio()
Definition: token.h:87
USDIMAGING_API Builder & SetCamera(const HdPathDataSourceHandle &camera)
HdBoolDataSource::Handle HdBoolDataSourceHandle
USDIMAGING_API Builder & SetDataWindowNDC(const HdVec4fDataSourceHandle &dataWindowNDC)
USDIMAGING_API HdPathDataSourceHandle GetCamera()
static USDIMAGING_API const HdDataSourceLocator & GetNamespacedSettingsLocator()
Prim-level relative data source locator to locate namespacedSettings.
HUSD_API const char * resolution()
USDIMAGING_API HdVec2iDataSourceHandle GetResolution()
HUSD_API const char * pixelAspectRatio()
USDIMAGING_API Builder & SetAspectRatioConformPolicy(const HdTokenDataSourceHandle &aspectRatioConformPolicy)
USDIMAGING_API Builder & SetResolution(const HdVec2iDataSourceHandle &resolution)
USDIMAGING_API HdTokenDataSourceHandle GetAspectRatioConformPolicy()
USDIMAGING_API Builder & SetProductType(const HdTokenDataSourceHandle &productType)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
USDIMAGING_API Builder & SetOrderedVars(const HdPathArrayDataSourceHandle &orderedVars)
USDIMAGING_API HdTokenDataSourceHandle GetProductType()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API HdPathArrayDataSourceHandle GetOrderedVars()
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 HdTokenDataSourceHandle &productType, const HdTokenDataSourceHandle &productName, const HdPathArrayDataSourceHandle &orderedVars, const HdContainerDataSourceHandle &namespacedSettings)
USDIMAGING_API Builder & SetDisableDepthOfField(const HdBoolDataSourceHandle &disableDepthOfField)
USDIMAGING_API Builder & SetPixelAspectRatio(const HdFloatDataSourceHandle &pixelAspectRatio)
HdVec2iDataSource::Handle HdVec2iDataSourceHandle
HUSD_API const char * productType()
TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderProductSchemaTokens, USDIMAGING_API, USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_TOKENS)
HUSD_API const char * dataWindowNDC()
USDIMAGING_API Builder & SetProductName(const HdTokenDataSourceHandle &productName)
HdPathDataSource::Handle HdPathDataSourceHandle
#define USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_TOKENS
USDIMAGING_API HdBoolDataSourceHandle GetDisableMotionBlur()
HUSD_API const char * productName()
USDIMAGING_API Builder & SetNamespacedSettings(const HdContainerDataSourceHandle &namespacedSettings)
HdTokenDataSource::Handle HdTokenDataSourceHandle
HUSD_API const char * disableMotionBlur()