UsdImagingDataSourceSchemaBased< UsdSchemaType, Translator > Class Template Reference

A container data source created from a Usd schema which accesses the attributes on the underlying Usd prim performing translation between the Usd attribute name, the key in the container data source and the data source locator. More...

+ Inheritance diagram for UsdImagingDataSourceSchemaBased< UsdSchemaType, Translator >:

Public Types

using This = UsdImagingDataSourceSchemaBased< UsdSchemaType, Translator >
 

Public Member Functions

 HD_DECLARE_DATASOURCE (This)
 
TfTokenVector GetNames () override
 Returns the list of names for which Get(...) is expected to return a non-null value. More...
 
HdDataSourceBaseHandle Get (const TfToken &name) override
 Returns the child datasource of the given name. More...
 
- Public Member Functions inherited from HdContainerDataSource
 HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource)
 

Static Public Member Functions

static HdDataSourceLocatorSet Invalidate (const TfToken &subprim, const TfTokenVector &usdNames)
 Translate usdNames to data source locators. More...
 
- Static Public Member Functions inherited from HdContainerDataSource
static HD_API HdDataSourceBaseHandle Get (const Handle &container, const HdDataSourceLocator &locator)
 A convenience function: given container, return the descendant identified by locator, which may be at any depth. More...
 

Detailed Description

template<typename UsdSchemaType, typename Translator>
class UsdImagingDataSourceSchemaBased< UsdSchemaType, Translator >

A container data source created from a Usd schema which accesses the attributes on the underlying Usd prim performing translation between the Usd attribute name, the key in the container data source and the data source locator.

The translation starts by taking the non-inherited attributes from the the given UsdSchemaType (e.g., UsdGeomSphere) and calling Translator::UsdAttributeNameToHdName(usdAttributeName) which can either return the corresponding hydra token or an empty token if the usd attribute should not occur in the data source.

The data source locator (relevant for invalidation) will be created by appending the hydra token to the data source locator returned by Translator::GetContainerLocator().

Definition at line 54 of file dataSourceSchemaBased.h.

Member Function Documentation

◆ Get()

HdDataSourceBaseHandle Get ( const TfToken name)
inlineoverridevirtual

Returns the child datasource of the given name.

This call is expected to be threadsafe.

Implements HdContainerDataSource.

Definition at line 66 of file dataSourceSchemaBased.h.

◆ GetNames()

TfTokenVector GetNames ( )
inlineoverridevirtual

Returns the list of names for which Get(...) is expected to return a non-null value.

This call is expected to be threadsafe.

Implements HdContainerDataSource.

Definition at line 61 of file dataSourceSchemaBased.h.

◆ Invalidate()

static HdDataSourceLocatorSet Invalidate ( const TfToken subprim,
const TfTokenVector usdNames 
)
inlinestatic

Translate usdNames to data source locators.

Definition at line 95 of file dataSourceSchemaBased.h.


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