HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
usdSceneIndexInputArgsSchema.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 ////////////////////////////////////////////////////////////////////////
8 
9 /* ************************************************************************** */
10 /* ** ** */
11 /* ** This file is generated by a script. ** */
12 /* ** ** */
13 /* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14 /* ** Edit hdSchemaDefs.py instead to make changes. ** */
15 /* ** ** */
16 /* ************************************************************************** */
17 
18 #ifndef PXR_USD_IMAGING_USD_IMAGING_USD_SCENE_INDEX_INPUT_ARGS_SCHEMA_H
19 #define PXR_USD_IMAGING_USD_IMAGING_USD_SCENE_INDEX_INPUT_ARGS_SCHEMA_H
20 
21 /// \file
22 
24 
25 #include "pxr/imaging/hd/schema.h"
26 
27 // --(BEGIN CUSTOM CODE: Includes)--
28 // --(END CUSTOM CODE: Includes)--
29 
31 
32 // --(BEGIN CUSTOM CODE: Declares)--
36 // --(END CUSTOM CODE: Declares)--
37 
38 #define USD_IMAGING_USD_SCENE_INDEX_INPUT_ARGS_SCHEMA_TOKENS \
39  (usdSceneIndex) \
40  (stage) \
41  (includeUnloadedPrims) \
42  (displayUnloadedPrimsWithBounds) \
43  (addDrawModeSceneIndex) \
44 
45 TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdSceneIndexInputArgsSchemaTokens, USDIMAGING_API,
47 
48 //-----------------------------------------------------------------------------
49 
50 
51 /// \class UsdImagingUsdSceneIndexInputArgsSchema
52 ///
54 {
55 public:
56  /// \name Schema retrieval
57  /// @{
58 
59  UsdImagingUsdSceneIndexInputArgsSchema(HdContainerDataSourceHandle container)
60  : HdSchema(container) {}
61 
62  /// Retrieves a container data source with the schema's default name token
63  /// "usdSceneIndex" from the parent container and constructs a
64  /// UsdImagingUsdSceneIndexInputArgsSchema instance.
65  /// Because the requested container data source may not exist, the result
66  /// should be checked with IsDefined() or a bool comparison before use.
69  const HdContainerDataSourceHandle &fromParentContainer);
70 
71  /// @}
72 
73 // --(BEGIN CUSTOM CODE: Schema Methods)--
74 // --(END CUSTOM CODE: Schema Methods)--
75 
76  /// \name Member accessor
77  /// @{
78 
81 
84 
87 
90 
91  /// @}
92 
93  /// \name Schema location
94  /// @{
95 
96  /// Returns a token where the container representing this schema is found in
97  /// a container by default.
99  static const TfToken &GetSchemaToken();
100 
101  /// Returns an HdDataSourceLocator (relative to the prim-level data source)
102  /// where the container representing this schema is found by default.
104  static const HdDataSourceLocator &GetDefaultLocator();
105 
106  /// @}
107 
108  /// \name Schema construction
109  /// @{
110 
111  /// \deprecated Use Builder instead.
112  ///
113  /// Builds a container data source which includes the provided child data
114  /// sources. Parameters with nullptr values are excluded. This is a
115  /// low-level interface. For cases in which it's desired to define
116  /// the container with a sparse set of child fields, the Builder class
117  /// is often more convenient and readable.
119  static HdContainerDataSourceHandle
121  const UsdStageRefPtrDataSourceHandle &stage,
122  const HdBoolDataSourceHandle &includeUnloadedPrims,
123  const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds,
124  const HdBoolDataSourceHandle &addDrawModeSceneIndex
125  );
126 
127  /// \class UsdImagingUsdSceneIndexInputArgsSchema::Builder
128  ///
129  /// Utility class for setting sparse sets of child data source fields to be
130  /// filled as arguments into BuildRetained. Because all setter methods
131  /// return a reference to the instance, this can be used in the "builder
132  /// pattern" form.
133  class Builder
134  {
135  public:
137  Builder &SetStage(
138  const UsdStageRefPtrDataSourceHandle &stage);
141  const HdBoolDataSourceHandle &includeUnloadedPrims);
144  const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds);
147  const HdBoolDataSourceHandle &addDrawModeSceneIndex);
148 
149  /// Returns a container data source containing the members set thus far.
151  HdContainerDataSourceHandle Build();
152 
153  private:
155  HdBoolDataSourceHandle _includeUnloadedPrims;
156  HdBoolDataSourceHandle _displayUnloadedPrimsWithBounds;
157  HdBoolDataSourceHandle _addDrawModeSceneIndex;
158 
159  };
160 
161  /// @}
162 };
163 
165 
166 #endif
USDIMAGING_API UsdStageRefPtrDataSourceHandle GetStage() const
static USDIMAGING_API const TfToken & GetSchemaToken()
#define USDIMAGING_API
Definition: api.h:23
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
static USDIMAGING_API const HdDataSourceLocator & GetDefaultLocator()
#define USD_IMAGING_USD_SCENE_INDEX_INPUT_ARGS_SCHEMA_TOKENS
static USDIMAGING_API UsdImagingUsdSceneIndexInputArgsSchema GetFromParent(const HdContainerDataSourceHandle &fromParentContainer)
UsdStageRefPtrDataSource::Handle UsdStageRefPtrDataSourceHandle
USDIMAGING_API HdBoolDataSourceHandle GetAddDrawModeSceneIndex() const
Definition: token.h:70
USDIMAGING_API HdBoolDataSourceHandle GetIncludeUnloadedPrims() const
USDIMAGING_API Builder & SetAddDrawModeSceneIndex(const HdBoolDataSourceHandle &addDrawModeSceneIndex)
HdBoolDataSource::Handle HdBoolDataSourceHandle
USDIMAGING_API Builder & SetStage(const UsdStageRefPtrDataSourceHandle &stage)
USDIMAGING_API Builder & SetDisplayUnloadedPrimsWithBounds(const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds)
UsdImagingUsdSceneIndexInputArgsSchema(HdContainerDataSourceHandle container)
USDIMAGING_API Builder & SetIncludeUnloadedPrims(const HdBoolDataSourceHandle &includeUnloadedPrims)
static USDIMAGING_API HdContainerDataSourceHandle BuildRetained(const UsdStageRefPtrDataSourceHandle &stage, const HdBoolDataSourceHandle &includeUnloadedPrims, const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds, const HdBoolDataSourceHandle &addDrawModeSceneIndex)
USDIMAGING_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
TF_DECLARE_PUBLIC_TOKENS(UsdImagingUsdSceneIndexInputArgsSchemaTokens, USDIMAGING_API, USD_IMAGING_USD_SCENE_INDEX_INPUT_ARGS_SCHEMA_TOKENS)
USDIMAGING_API HdBoolDataSourceHandle GetDisplayUnloadedPrimsWithBounds() const
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(UsdStage)
void * Handle
Definition: plugin.h:27