Loading...
Searching...
No Matches
applicationRenderSettingsSceneIndex.h
1//
2// Copyright 2026 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HDSI_APPLICATION_RENDER_SETTINGS_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_APPLICATION_RENDER_SETTINGS_SCENE_INDEX_H
9
10#include "pxr/imaging/hdsi/api.h"
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/imaging/hd/schemaTypeDefs.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16namespace HdsiApplicationRenderSettingsSceneIndex_Impl
17{
18struct _RenderSettingsInfo;
19using _RenderSettingsInfoSharedPtr = std::shared_ptr<_RenderSettingsInfo>;
20}
21
23
41{
42public:
46 HDSI_API
47 static HdsiApplicationRenderSettingsSceneIndexRefPtr
48 New(const HdSceneIndexBaseRefPtr &inputSceneIndex,
49 const HdContainerDataSourceHandle &inputArgs);
50
52 HDSI_API
55
70
72 HDSI_API
74
79 HDSI_API
80 void SetApplicationOverrideRenderSetting(const TfToken &name, const VtValue &value);
81
84 HDSI_API
86
87 HDSI_API
88 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
89
90 HDSI_API
91 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
92
93protected:
94 HDSI_API
96 const HdSceneIndexBaseRefPtr &inputSceneIndex,
97 const HdContainerDataSourceHandle &inputArgs);
98
99 HDSI_API
100 void _PrimsAdded(
101 const HdSceneIndexBase &sender,
102 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
103
104 HDSI_API
105 void _PrimsRemoved(
106 const HdSceneIndexBase &sender,
107 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
108
109 HDSI_API
110 void _PrimsDirtied(
111 const HdSceneIndexBase &sender,
112 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
113
114private:
116 const HdSceneIndexBaseRefPtr &inputSceneIndex,
118
119 HdContainerDataSourceHandle _GetInputRenderSettingsDataSource() const;
120 HdContainerDataSourceHandle _GetApplicationRenderSettingsDataSource() const;
121
122 HdsiApplicationRenderSettingsSceneIndex_Impl::_RenderSettingsInfoSharedPtr
123 const _info;
124};
125
126PXR_NAMESPACE_CLOSE_SCOPE
127
128#endif // PXR_IMAGING_HDSI_APPLICATION_RENDER_SETTINGS_SCENE_INDEX_H
Template class for a schema backed by a container whose children have arbitrary names but an expected...
Abstract interface to scene data.
Definition sceneIndex.h:55
An abstract base class for a filtering scene index that observes a single input scene index.
A filtering scene index that lets an application inject a single, authoritative render settings prim ...
@ InputRenderSettings
The opinion from the render settings prim at the active render settings prim path in the input scene ...
@ RendererDefault
The default value that the renderer provides for the render setting.
@ ApplicationOverride
The override opinion set on the scene index.
@ Resolved
The resolved value as seen by observers of the render settings prim in this scene index.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDSI_API void SetApplicationOverrideRenderSetting(const TfToken &name, const VtValue &value)
Overrides the value for the render setting name with an application opinion, taking precedence over t...
static HDSI_API const SdfPath & GetApplicationRenderSettingsPrimPath()
Path of the injected render settings prim (/__ApplicationRenderSettings).
HDSI_API VtValue GetRenderSetting(RenderSettingsSource src, const TfToken &name) const
Returns the value of a render setting name at a particular stage name.
HDSI_API HdRenderSettingDescriptorContainerSchema GetRenderSettingDescriptorsFromRenderer() const
The render setting descriptors advertised by the renderer.
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
static HDSI_API HdsiApplicationRenderSettingsSceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputSceneIndex, const HdContainerDataSourceHandle &inputArgs)
The scene index assumes that inputArgs conforms to HdSceneIndexCreateArgsSchema to extract the render...
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition token.h:81
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition declarePtrs.h:72
Small struct representing a 'prim' in the Hydra scene index.
Definition sceneIndex.h:36