18#ifndef PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
19#define PXR_IMAGING_HD_SCENE_GLOBALS_SCHEMA_H
23#include "pxr/imaging/hd/api.h"
25#include "pxr/imaging/hd/schema.h"
28#include "pxr/usd/sdf/path.h"
29#include "pxr/imaging/hd/sceneIndex.h"
32PXR_NAMESPACE_OPEN_SCOPE
37#define HD_SCENE_GLOBALS_SCHEMA_TOKENS \
40 (activeRenderPassPrim) \
41 (activeRenderSettingsPrim) \
44 (timeCodesPerSecond) \
49 HD_SCENE_GLOBALS_SCHEMA_TOKENS);
67class HdSceneGlobalsSchema :
public HdSchema
73 HdSceneGlobalsSchema(HdContainerDataSourceHandle container)
82 static HdSceneGlobalsSchema GetFromParent(
83 const HdContainerDataSourceHandle &fromParentContainer);
96 static HdSceneGlobalsSchema
98 const HdSceneIndexBaseRefPtr &si);
103 GetDefaultPrimPath() {
113 HdPathDataSourceHandle GetPrimaryCameraPrim()
const;
116 HdPathDataSourceHandle GetActiveRenderPassPrim()
const;
119 HdPathDataSourceHandle GetActiveRenderSettingsPrim()
const;
122 HdDoubleDataSourceHandle GetStartTimeCode()
const;
125 HdDoubleDataSourceHandle GetEndTimeCode()
const;
128 HdDoubleDataSourceHandle GetTimeCodesPerSecond()
const;
131 HdDoubleDataSourceHandle GetCurrentFrame()
const;
134 HdIntDataSourceHandle GetSceneStateId()
const;
144 static const TfToken &GetSchemaToken();
206 static HdContainerDataSourceHandle
208 const HdPathDataSourceHandle &primaryCameraPrim,
209 const HdPathDataSourceHandle &activeRenderPassPrim,
210 const HdPathDataSourceHandle &activeRenderSettingsPrim,
211 const HdDoubleDataSourceHandle &startTimeCode,
212 const HdDoubleDataSourceHandle &endTimeCode,
213 const HdDoubleDataSourceHandle &timeCodesPerSecond,
214 const HdDoubleDataSourceHandle ¤tFrame,
215 const HdIntDataSourceHandle &sceneStateId
229 const HdPathDataSourceHandle &primaryCameraPrim);
231 Builder &SetActiveRenderPassPrim(
232 const HdPathDataSourceHandle &activeRenderPassPrim);
234 Builder &SetActiveRenderSettingsPrim(
235 const HdPathDataSourceHandle &activeRenderSettingsPrim);
238 const HdDoubleDataSourceHandle &startTimeCode);
241 const HdDoubleDataSourceHandle &endTimeCode);
243 Builder &SetTimeCodesPerSecond(
244 const HdDoubleDataSourceHandle &timeCodesPerSecond);
247 const HdDoubleDataSourceHandle ¤tFrame);
250 const HdIntDataSourceHandle &sceneStateId);
254 HdContainerDataSourceHandle
Build();
257 HdPathDataSourceHandle _primaryCameraPrim;
258 HdPathDataSourceHandle _activeRenderPassPrim;
259 HdPathDataSourceHandle _activeRenderSettingsPrim;
260 HdDoubleDataSourceHandle _startTimeCode;
261 HdDoubleDataSourceHandle _endTimeCode;
262 HdDoubleDataSourceHandle _timeCodesPerSecond;
263 HdDoubleDataSourceHandle _currentFrame;
264 HdIntDataSourceHandle _sceneStateId;
271PXR_NAMESPACE_CLOSE_SCOPE
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...
A path value used to locate objects in layers or scenegraphs.
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.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.