![]() |
|
A scene index plugin bundles one or more (typically filtering) scene indices together and enables their runtime discovery and participation in the scene index graph construction process. More...
#include <sceneIndexPlugin.h>
Inheritance diagram for HdSceneIndexPlugin:Public Member Functions | |
| HD_API HdSceneIndexBaseRefPtr | AppendSceneIndex (const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) |
| HD_API bool | IsEnabled (const HdContainerDataSourceHandle &inputArgs) const |
| Returns true if the plugin is enabled, in the sense that it should be consulted for its contribution to the scene index chain via AppendSceneIndex. | |
Protected Member Functions | |
| virtual HD_API HdSceneIndexBaseRefPtr | _AppendSceneIndex (const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) |
| Subclasses implement this to instantiate one or more scene indicies which take the provided scene as input. | |
| virtual HD_API HdSceneIndexBaseRefPtr | _AppendSceneIndex (const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) |
| Subclasses implement this to instantiate one or more scene indicies which take the provided scene as input. | |
| virtual HD_API bool | _IsEnabled (const HdContainerDataSourceHandle &inputArgs) const |
| Subclasses implement this to indicate whether the plugin is enabled. | |
A scene index plugin bundles one or more (typically filtering) scene indices together and enables their runtime discovery and participation in the scene index graph construction process.
Scene index plugins leverage the Plug system and are required to have a corresponding entry in the plugInfo.json file in the library directory they are housed in. They are managed by the HdSceneIndexPluginRegistry.
The JSON entry for a scene index plugin should have the following structure:
Definition at line 76 of file sceneIndexPlugin.h.
|
protectedvirtual |
Subclasses implement this to instantiate one or more scene indicies which take the provided scene as input.
The return value should be the final scene created – or the inputScene itself if nothing is created.
Reimplemented in HdGpSceneIndexPlugin, HdPrman_DependencySceneIndexPlugin, HdPrman_MatFiltSceneIndexPlugin, HdPrman_PortalLightResolvingSceneIndexPlugin, HdPrman_TetMeshConversionSceneIndexPlugin, and HdsiDebuggingSceneIndexPlugin.
|
protectedvirtual |
Subclasses implement this to instantiate one or more scene indicies which take the provided scene as input.
The return value should be the final scene created – or the inputScene itself if nothing is created.
Callers can override this method if they want to get the render instance ID in addition to the input scene and arguments. Callers should only override one of the two _AppendSceneIndex overrides: if both are overridden, only this override will be called.
|
protectedvirtual |
Subclasses implement this to indicate whether the plugin is enabled.
This is preferable to using env guards to gate registration and scene index instatiation in _AppendSceneIndex.
Base implementation returns true.
Reimplemented in HdGpSceneIndexPlugin, and HdsiDebuggingSceneIndexPlugin.
| HD_API bool IsEnabled | ( | const HdContainerDataSourceHandle & | inputArgs | ) | const |
Returns true if the plugin is enabled, in the sense that it should be consulted for its contribution to the scene index chain via AppendSceneIndex.
Current implementation simply delegates to _IsEnabled; this may change in the future to first consult inputArgs (e.g. to check a data source that provides the plugin IDs to disable) before calling _IsEnabled.