HDK
|
#include <sceneIndexPluginRegistry.h>
Public Types | |
enum | InsertionOrder { InsertionOrderAtStart, InsertionOrderAtEnd } |
using | InsertionPhase = int |
using | SceneIndexAppendCallback = std::function< HdSceneIndexBaseRefPtr(const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs)> |
Public Member Functions | |
HD_API HdSceneIndexBaseRefPtr | AppendSceneIndex (const TfToken &sceneIndexPluginId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs, const std::string &renderInstanceId=std::string()) |
HD_API HdSceneIndexBaseRefPtr | AppendSceneIndicesForRenderer (const std::string &rendererDisplayName, const HdSceneIndexBaseRefPtr &inputScene, const std::string &renderInstanceId=std::string(), const std::string &appName=std::string()) |
HD_API void | RegisterSceneIndexForRenderer (const std::string &rendererDisplayName, const TfToken &sceneIndexPluginId, const HdContainerDataSourceHandle &inputArgs, InsertionPhase insertionPhase, InsertionOrder insertionOrder) |
HD_API void | RegisterSceneIndexForRenderer (const std::string &rendererDisplayName, SceneIndexAppendCallback callback, const HdContainerDataSourceHandle &inputArgs, InsertionPhase insertionPhase, InsertionOrder insertionOrder) |
![]() | |
HF_API void | GetPluginDescs (HfPluginDescVector *plugins) |
HF_API bool | GetPluginDesc (const TfToken &pluginId, HfPluginDesc *desc) |
HF_API void | AddPluginReference (HfPluginBase *plugin) |
HF_API void | ReleasePlugin (HfPluginBase *plugin) |
HF_API bool | IsRegisteredPlugin (const TfToken &pluginId) |
HF_API TfToken | GetPluginId (const HfPluginBase *plugin) const |
Static Public Member Functions | |
static HD_API HdSceneIndexPluginRegistry & | GetInstance () |
template<typename T , typename... Bases> | |
static void | Define () |
Protected Member Functions | |
void | _CollectAdditionalMetadata (const PlugRegistry &plugRegistry, const TfType &pluginType) override |
![]() | |
HF_API | HfPluginRegistry (const TfType &pluginBaseType) |
virtual HF_API | ~HfPluginRegistry () |
HF_API HfPluginBase * | GetPlugin (const TfToken &pluginId) |
Friends | |
class | TfSingleton< HdSceneIndexPluginRegistry > |
Additional Inherited Members | |
![]() | |
template<typename T , typename PluginBaseType , typename... Bases> | |
static void | Define () |
Definition at line 30 of file sceneIndexPluginRegistry.h.
Definition at line 85 of file sceneIndexPluginRegistry.h.
using HdSceneIndexPluginRegistry::SceneIndexAppendCallback = std::function< HdSceneIndexBaseRefPtr( const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs)> |
Definition at line 109 of file sceneIndexPluginRegistry.h.
Enumerator | |
---|---|
InsertionOrderAtStart | |
InsertionOrderAtEnd |
Definition at line 79 of file sceneIndexPluginRegistry.h.
|
overrideprotectedvirtual |
Gives subclasses an opportunity to inspect plugInfo-based metadata at the time of discovery.
Reimplemented from HfPluginRegistry.
HD_API HdSceneIndexBaseRefPtr HdSceneIndexPluginRegistry::AppendSceneIndex | ( | const TfToken & | sceneIndexPluginId, |
const HdSceneIndexBaseRefPtr & | inputScene, | ||
const HdContainerDataSourceHandle & | inputArgs, | ||
const std::string & | renderInstanceId = std::string() |
||
) |
Given a specific scene index plug-in id, give the plug-in a chance to add scene indices to the end of the chain. Return value is the last scene index – or inputScene if the plug-in chooses not to act. Input arguments may be nullptr if not relevant to this plug-in.
HD_API HdSceneIndexBaseRefPtr HdSceneIndexPluginRegistry::AppendSceneIndicesForRenderer | ( | const std::string & | rendererDisplayName, |
const HdSceneIndexBaseRefPtr & | inputScene, | ||
const std::string & | renderInstanceId = std::string() , |
||
const std::string & | appName = std::string() |
||
) |
Append scene indices generated by plug-ins registered (via RegisterSceneIndexForRenderer) for this renderer. Return value is the last scene index – or inputScene if no plugins are registered or taking action. This also includes plug-ins registered for all renderers (via an empty rendererDisplayName) to be added in advance of any registered for the specified renderer.
Plugin libraries will only be loaded if they declare they are enabled for the provided app name. By default, plugins are auto-loaded for all apps, but plugin authors can put an preloadInApps array in their plugInfo to narrow down the set of applications they are auto-loaded for. Providing an empty app name here (the default) means this will not auto-load any application-specific plugin libraries.
|
static |
Entry point for defining an HdSceneIndexPlugin plugin.
Definition at line 204 of file sceneIndexPluginRegistry.h.
|
static |
Returns the singleton registry for HdSceneIndexPlugin
HD_API void HdSceneIndexPluginRegistry::RegisterSceneIndexForRenderer | ( | const std::string & | rendererDisplayName, |
const TfToken & | sceneIndexPluginId, | ||
const HdContainerDataSourceHandle & | inputArgs, | ||
InsertionPhase | insertionPhase, | ||
InsertionOrder | insertionOrder | ||
) |
Register a scene index to be instantiated for a specified renderer (or all renderers if rendererDisplayName is empty).
Insertion phase is a broad ordering value with lower values indicating earlier instantiation (possibly given render plugin-specific meaning via enum values). Insertion order indicates whether this entry should go at the start or end of the specified phase.
HD_API void HdSceneIndexPluginRegistry::RegisterSceneIndexForRenderer | ( | const std::string & | rendererDisplayName, |
SceneIndexAppendCallback | callback, | ||
const HdContainerDataSourceHandle & | inputArgs, | ||
InsertionPhase | insertionPhase, | ||
InsertionOrder | insertionOrder | ||
) |
Register a scene index to be instantiated via a callback for a specified renderer (or all renderers if rendererDisplayName is empty).
This is most useful for application-specific behavior which wants to append and manage scene index instances associated with a specific render. To aid in that association, the callback is provided a renderInstanceId value typically defined by the application itself.
Insertion phase is a broad ordering value with lower values indicating earlier instantiation (possibly given render plugin-specific meaning via enum values). Insertion order indicates whether this entry should go at the start or end of the specified phase.
|
friend |
Definition at line 144 of file sceneIndexPluginRegistry.h.