Loading...
Searching...
No Matches
sceneGlobalsSchema.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//
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 hdSchemaDefs.py instead to make changes. ** */
32/* ** ** */
33/* ************************************************************************** */
34
35#ifndef PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
36#define PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
37
39
40#include "pxr/imaging/hd/api.h"
41
42#include "pxr/imaging/hd/schema.h"
43
44// --(BEGIN CUSTOM CODE: Includes)--
45#include "pxr/usd/sdf/path.h"
46#include "pxr/imaging/hd/sceneIndex.h"
47// --(END CUSTOM CODE: Includes)--
48
49PXR_NAMESPACE_OPEN_SCOPE
50
51// --(BEGIN CUSTOM CODE: Declares)--
52// --(END CUSTOM CODE: Declares)--
53
54#define HD_SCENE_GLOBALS_SCHEMA_TOKENS \
55 (sceneGlobals) \
56 (activeRenderSettingsPrim) \
57 (startTimeCode) \
58 (endTimeCode) \
59
60TF_DECLARE_PUBLIC_TOKENS(HdSceneGlobalsSchemaTokens, HD_API,
61 HD_SCENE_GLOBALS_SCHEMA_TOKENS);
62
63//-----------------------------------------------------------------------------
64
65// The HdSceneGlobalsSchema encapsulates "global" state to orchestrate a
66// render. It currently houses the active render settings prim path that
67// describes the information necessary to generate images from a single
68// invocation of a renderer, and the active time sample range that may be
69// relevant to downstream scene indices (e.g. procedural evaluation).
70//
71// We shall use the convention of a container data source at the root prim of
72// the scene index that is populated with this global state. The renderer and
73// downstream scene indices can query it to configure their behavior as
74// necessary.
75//
76
77class HdSceneGlobalsSchema : public HdSchema
78{
79public:
82
83 HdSceneGlobalsSchema(HdContainerDataSourceHandle container)
84 : HdSchema(container) {}
85
91 HD_API
92 static HdSceneGlobalsSchema GetFromParent(
93 const HdContainerDataSourceHandle &fromParentContainer);
94
96
97// --(BEGIN CUSTOM CODE: Schema Methods)--
98
105 HD_API
106 static HdSceneGlobalsSchema
107 GetFromSceneIndex(
108 const HdSceneIndexBaseRefPtr &si);
109
112 static const SdfPath&
113 GetDefaultPrimPath() {
115 }
116
117// --(END CUSTOM CODE: Schema Methods)--
118
121
122 HD_API
123 HdPathDataSourceHandle GetActiveRenderSettingsPrim() const;
124
125 HD_API
126 HdDoubleDataSourceHandle GetStartTimeCode() const;
127
128 HD_API
129 HdDoubleDataSourceHandle GetEndTimeCode() const;
130
132
135
138 HD_API
139 static const TfToken &GetSchemaToken();
140
143 HD_API
144 static const HdDataSourceLocator &GetDefaultLocator();
145
147
156
158 HD_API
159 static const HdDataSourceLocator &GetActiveRenderSettingsPrimLocator();
160
162 HD_API
163 static const HdDataSourceLocator &GetStartTimeCodeLocator();
164
166 HD_API
167 static const HdDataSourceLocator &GetEndTimeCodeLocator();
169
172
180 HD_API
181 static HdContainerDataSourceHandle
182 BuildRetained(
183 const HdPathDataSourceHandle &activeRenderSettingsPrim,
184 const HdDoubleDataSourceHandle &startTimeCode,
185 const HdDoubleDataSourceHandle &endTimeCode
186 );
187
195 {
196 public:
197 HD_API
198 Builder &SetActiveRenderSettingsPrim(
199 const HdPathDataSourceHandle &activeRenderSettingsPrim);
200 HD_API
201 Builder &SetStartTimeCode(
202 const HdDoubleDataSourceHandle &startTimeCode);
203 HD_API
204 Builder &SetEndTimeCode(
205 const HdDoubleDataSourceHandle &endTimeCode);
206
208 HD_API
209 HdContainerDataSourceHandle Build();
210
211 private:
212 HdPathDataSourceHandle _activeRenderSettingsPrim;
213 HdDoubleDataSourceHandle _startTimeCode;
214 HdDoubleDataSourceHandle _endTimeCode;
215
216 };
217
219};
220
221PXR_NAMESPACE_CLOSE_SCOPE
222
223#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_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
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
static SDF_API const SdfPath & AbsoluteRootPath()
The absolute path representing the top of the namespace hierarchy.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:88
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:98