Loading...
Searching...
No Matches
UsdImagingSceneIndexPlugin Class Referenceabstract

A base class for scene index plugins that can insert filtering scene indices into UsdImaging, see sceneIndices.cpp for details. More...

#include <sceneIndexPlugin.h>

+ Inheritance diagram for UsdImagingSceneIndexPlugin:

Public Member Functions

virtual HdSceneIndexBaseRefPtr AppendSceneIndex (HdSceneIndexBaseRefPtr const &inputScene)=0
 Override by client. Similar to HdSceneIndexPlugin::AppendSceneIndex.
 
virtual USDIMAGING_API HdContainerDataSourceHandle FlattenedDataSourceProviders ()
 Clients can register additional HdFlattenedDataSourceProvider's that UsdImagingCreateSceneIndices will pass to the flattening scene index.
 
virtual USDIMAGING_API TfTokenVector InstanceDataSourceNames ()
 Clients can register additional names used by the (native) instance aggregation scene index when grouping instances.
 
virtual USDIMAGING_API TfTokenVector ProxyPathTranslationDataSourceNames ()
 Clients can register additional names of prim-level data sources that should receive path-translation for any path-valued data sources that point at instance proxies to point to corresponding prototypes.
 

Static Public Member Functions

template<typename T >
static void Define ()
 Call within TF_REGISTRY_FUNCTION(UsdImagingSceneIndexPlugin) to ensure that UsdImaging can instantiate the client's subclass of UsdImagingSceneIndexPlugin.
 
static std::vector< UsdImagingSceneIndexPluginUniquePtr > GetAllSceneIndexPlugins ()
 Get an instance of each registered UsdImagingSceneIndexPlugin.
 

Detailed Description

A base class for scene index plugins that can insert filtering scene indices into UsdImaging, see sceneIndices.cpp for details.

This is intended for UsdSkelImaging inserting scene indices implementing the UsdSkel behaviors.

Usage:

class MyPlugin : public UsdImagingSceneIndexPlugin { public: HdSceneIndexBaseRefPtr AppendSceneIndex(HdSceneIndexBaseRefPtr const &inputScene) override { ... } };

TF_REGISTRY_FUNCTION(UsdImagingSceneIndexPlugin) { // Also add to plugInfo.json. UsdImagingSceneIndexPlugin::Define<MyPlugin>(); }

Definition at line 51 of file sceneIndexPlugin.h.

Member Function Documentation

◆ AppendSceneIndex()

virtual HdSceneIndexBaseRefPtr AppendSceneIndex ( HdSceneIndexBaseRefPtr const &  inputScene)
pure virtual

Override by client. Similar to HdSceneIndexPlugin::AppendSceneIndex.

Implemented in UsdSkelImagingResolvingSceneIndexPlugin.

◆ Define()

static void Define ( )
inlinestatic

Call within TF_REGISTRY_FUNCTION(UsdImagingSceneIndexPlugin) to ensure that UsdImaging can instantiate the client's subclass of UsdImagingSceneIndexPlugin.

Definition at line 120 of file sceneIndexPlugin.h.

◆ FlattenedDataSourceProviders()

virtual USDIMAGING_API HdContainerDataSourceHandle FlattenedDataSourceProviders ( )
virtual

Clients can register additional HdFlattenedDataSourceProvider's that UsdImagingCreateSceneIndices will pass to the flattening scene index.

Clients can use HdMakeDataSourceContainingFlattenedDataSourceProvider::Make to create the values of the container data source.

Reimplemented in UsdSkelImagingResolvingSceneIndexPlugin.

◆ GetAllSceneIndexPlugins()

static std::vector< UsdImagingSceneIndexPluginUniquePtr > GetAllSceneIndexPlugins ( )
static

Get an instance of each registered UsdImagingSceneIndexPlugin.

◆ InstanceDataSourceNames()

virtual USDIMAGING_API TfTokenVector InstanceDataSourceNames ( )
virtual

Clients can register additional names used by the (native) instance aggregation scene index when grouping instances.

For example, two instances with different material bindings cannot be aggregated together and instantiated by the same instancer.

UsdImagingCreateSceneIndices knows about several such bindings already. Here, clients can add additional data sources that should be expected by the aggregation scene index. These data sources are identified by their name in the prim-level container data source.

Reimplemented in UsdSkelImagingResolvingSceneIndexPlugin.

◆ ProxyPathTranslationDataSourceNames()

virtual USDIMAGING_API TfTokenVector ProxyPathTranslationDataSourceNames ( )
virtual

Clients can register additional names of prim-level data sources that should receive path-translation for any path-valued data sources that point at instance proxies to point to corresponding prototypes.

Reimplemented in UsdSkelImagingResolvingSceneIndexPlugin.


The documentation for this class was generated from the following file: