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 /* ** 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 
35 
36 #include "pxr/imaging/hd/schema.h"
37 
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,
57 
58 //-----------------------------------------------------------------------------
59 
61 {
62 public:
63  UsdImagingUsdRenderProductSchema(HdContainerDataSourceHandle container)
64  : HdSchema(container) {}
65 
66  //ACCESSORS
67 
87  HdContainerDataSourceHandle GetNamespacedSettings();
88 
89  // RETRIEVING AND CONSTRUCTING
90 
91  /// Builds a container data source which includes the provided child data
92  /// sources. Parameters with nullptr values are excluded. This is a
93  /// low-level interface. For cases in which it's desired to define
94  /// the container with a sparse set of child fields, the Builder class
95  /// is often more convenient and readable.
97  static HdContainerDataSourceHandle
104  const HdPathDataSourceHandle &camera,
107  const HdPathArrayDataSourceHandle &orderedVars,
108  const HdContainerDataSourceHandle &namespacedSettings
109  );
110 
111  /// \class UsdImagingUsdRenderProductSchema::Builder
112  ///
113  /// Utility class for setting sparse sets of child data source fields to be
114  /// filled as arguments into BuildRetained. Because all setter methods
115  /// return a reference to the instance, this can be used in the "builder
116  /// pattern" form.
117  class Builder
118  {
119  public:
137  const HdPathDataSourceHandle &camera);
146  const HdPathArrayDataSourceHandle &orderedVars);
149  const HdContainerDataSourceHandle &namespacedSettings);
150 
151  /// Returns a container data source containing the members set thus far.
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 
168  /// Retrieves a container data source with the schema's default name token
169  /// "__usdRenderProduct" from the parent container and constructs a
170  /// UsdImagingUsdRenderProductSchema instance.
171  /// Because the requested container data source may not exist, the result
172  /// should be checked with IsDefined() or a bool comparison before use.
175  const HdContainerDataSourceHandle &fromParentContainer);
176 
177  /// Returns a token where the container representing this schema is found in
178  /// a container by default.
180  static const TfToken &GetSchemaToken();
181 
182  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
183  /// where the container representing this schema is found by default.
185  static const HdDataSourceLocator &GetDefaultLocator();
186 
187 
188  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
189  /// where the namespacedsettings data source can be found.
190  /// This is often useful for checking intersection against the
191  /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
194 
195 };
196 
198 
199 #endif
USDIMAGING_API HdVec4fDataSourceHandle GetDataWindowNDC()
USDIMAGING_API Builder & SetDisableMotionBlur(const HdBoolDataSourceHandle &disableMotionBlur)
TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdRenderProductSchemaTokens, USDIMAGING_API, USDIMAGINGUSDRENDERPRODUCT_SCHEMA_TOKENS)
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.
#define USDIMAGINGUSDRENDERPRODUCT_SCHEMA_TOKENS
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()
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:1441
USDIMAGING_API Builder & SetOrderedVars(const HdPathArrayDataSourceHandle &orderedVars)
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const HdVec2iDataSourceHandle &resolution, const HdFloatDataSourceHandle &pixelAspectRatio, const HdTokenDataSourceHandle &aspectRatioConformPolicy, const HdVec4fDataSourceHandle &dataWindowNDC, const HdBoolDataSourceHandle &disableMotionBlur, const HdPathDataSourceHandle &camera, const HdTokenDataSourceHandle &productType, const HdTokenDataSourceHandle &productName, const HdPathArrayDataSourceHandle &orderedVars, const HdContainerDataSourceHandle &namespacedSettings)
USDIMAGING_API HdTokenDataSourceHandle GetProductType()
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
USDIMAGING_API HdPathArrayDataSourceHandle GetOrderedVars()
USDIMAGING_API Builder & SetPixelAspectRatio(const HdFloatDataSourceHandle &pixelAspectRatio)
HdVec2iDataSource::Handle HdVec2iDataSourceHandle
HUSD_API const char * productType()
HUSD_API const char * dataWindowNDC()
USDIMAGING_API Builder & SetProductName(const HdTokenDataSourceHandle &productName)
HdPathDataSource::Handle HdPathDataSourceHandle
USDIMAGING_API HdBoolDataSourceHandle GetDisableMotionBlur()
HUSD_API const char * productName()
USDIMAGING_API Builder & SetNamespacedSettings(const HdContainerDataSourceHandle &namespacedSettings)
HdTokenDataSource::Handle HdTokenDataSourceHandle
HUSD_API const char * disableMotionBlur()