dataSourceRenderPrims.h
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 #ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_RENDER_PRIMS_H
26 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_RENDER_PRIMS_H
27 
28 #include "pxr/usdImaging/usdImaging/dataSourcePrim.h"
29 #include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
30 
31 #include "pxr/imaging/hd/dataSource.h"
32 
33 
34 PXR_NAMESPACE_OPEN_SCOPE
35 
41 {
42 public:
43  HD_DECLARE_DATASOURCE(UsdImagingDataSourceRenderSettingsPrim);
44 
45  USDIMAGING_API
46  TfTokenVector GetNames() override;
47 
48  USDIMAGING_API
49  HdDataSourceBaseHandle Get(const TfToken &name) override;
50 
51  USDIMAGING_API
52  static
54  Invalidate(
55  UsdPrim const& prim,
56  const TfToken &subprim,
57  const TfTokenVector &properties);
58 
59 private:
60  // Private constructor, use static New() instead.
62  const SdfPath &sceneIndexPath,
63  UsdPrim usdPrim,
64  const UsdImagingDataSourceStageGlobals &stageGlobals);
65 };
66 
67 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceRenderSettingsPrim);
68 
69 
75 {
76 public:
77  HD_DECLARE_DATASOURCE(UsdImagingDataSourceRenderProductPrim);
78 
79  USDIMAGING_API
80  TfTokenVector GetNames() override;
81 
82  USDIMAGING_API
83  HdDataSourceBaseHandle Get(const TfToken &name) override;
84 
85  USDIMAGING_API
86  static
88  Invalidate(
89  UsdPrim const& prim,
90  const TfToken &subprim,
91  const TfTokenVector &properties);
92 
93 private:
94  // Private constructor, use static New() instead.
96  const SdfPath &sceneIndexPath,
97  UsdPrim usdPrim,
98  const UsdImagingDataSourceStageGlobals &stageGlobals);
99 };
100 
101 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceRenderProductPrim);
102 
103 
109 {
110 public:
111  HD_DECLARE_DATASOURCE(UsdImagingDataSourceRenderVarPrim);
112 
113  USDIMAGING_API
114  TfTokenVector GetNames() override;
115 
116  USDIMAGING_API
117  HdDataSourceBaseHandle Get(const TfToken &name) override;
118 
119  USDIMAGING_API
120  static
122  Invalidate(
123  UsdPrim const& prim,
124  const TfToken &subprim,
125  const TfTokenVector &properties);
126 
127 private:
128 
129  // Private constructor, use static New() instead.
131  const SdfPath &sceneIndexPath,
132  UsdPrim usdPrim,
133  const UsdImagingDataSourceStageGlobals &stageGlobals);
134 };
135 
136 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceRenderVarPrim);
137 
138 PXR_NAMESPACE_CLOSE_SCOPE
139 
140 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_RENDER_PRIMS_H
USDIMAGING_API TfTokenVector GetNames() override
Returns the names for which this data source can return meaningful results.
USDIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the data source representing name, if valid.
A prim data source representing UsdRenderSettings.
USDIMAGING_API TfTokenVector GetNames() override
Returns the names for which this data source can return meaningful results.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
Data source representing a basic USD prim.
This class is used as a context object with global stage information, that gets passed down to dataso...
USDIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the data source representing name, if valid.
Represents a set of data source locators closed under descendancy.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:135
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:442
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
A prim data source representing UsdRenderProduct.
USDIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the data source representing name, if valid.
USDIMAGING_API TfTokenVector GetNames() override
Returns the names for which this data source can return meaningful results.
A prim data source representing UsdRenderVar.