|
A data source that is a (potentially nested) container for the values of the attributes of a given UsdPrim. More...
#include <dataSourceMapped.h>
Classes | |
struct | AttributeMapping |
Specify how one attribute on given Usd prim maps to data source in this (nested) container data source. More... | |
class | AttributeMappings |
Specify how attributes on given Usd prim maps to data sources in this (nested) container data source. More... | |
Public Types | |
using | DataSourceAttributeFactory = HdSampledDataSourceHandle(const UsdAttribute &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
Signature of function to compute data source from attribute. | |
using | DataSourceAttributeFactoryFn = std::function< DataSourceAttributeFactory > |
using | DataSourceAttributeFactoryPtr = DataSourceAttributeFactory * |
Public Member Functions | |
HD_DECLARE_DATASOURCE (UsdImagingDataSourceMapped) | |
USDIMAGING_API TfTokenVector | GetNames () override |
Returns the list of names for which Get(...) is expected to return a non-null value. | |
USDIMAGING_API HdDataSourceBaseHandle | Get (const TfToken &name) override |
Returns the child datasource of the given name. | |
Public Member Functions inherited from HdContainerDataSource | |
HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource) | |
virtual TfTokenVector | GetNames ()=0 |
Returns the list of names for which Get(...) is expected to return a non-null value. | |
virtual HdDataSourceBaseHandle | Get (const TfToken &name)=0 |
Returns the child datasource of the given name. | |
Static Public Member Functions | |
static USDIMAGING_API HdDataSourceLocatorSet | Invalidate (const TfTokenVector &usdNames, const AttributeMappings &mappings) |
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. | |
A data source that is a (potentially nested) container for the values of the attributes of a given UsdPrim.
That is, this container data source contains HdSampledDataSource
s giving the value of an attribute, either directly or in a nested fashion by containing container data sources itself.
The mapping of attributes to locations in the (nested) container data source can be specified through AttributeMapping. These locations are relative to the UsdImagingDataSourceMapped itself. To compute the correct data source locators for invalidation purposes, the location of the UsdImagingDataSourceMapped needs to be given to AttributeMappings so that absolute locators (that is relative to the prim data source) can be computed.
Definition at line 58 of file dataSourceMapped.h.
struct UsdImagingDataSourceMapped::AttributeMapping |
Specify how one attribute on given Usd prim maps to data source in this (nested) container data source.
Definition at line 82 of file dataSourceMapped.h.
Class Members | ||
---|---|---|
DataSourceAttributeFactoryFn | factory |
Function to compute data source from UsdAttribute. Defaults to the appropriate overload of UsdImagingDataSourceAttributeNew. Clients can implement custom behavior. For example, following the connection of a UsdShadeOutput and return the path of the connected prim. |
HdDataSourceLocator | hdLocator |
Corresponding location in this data source. Has to be non-empty. If length is greater than one, nested container data sources will be created. |
TfToken | usdName | Name of attribute on Usd Prim. |
using DataSourceAttributeFactory = HdSampledDataSourceHandle(const UsdAttribute &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
Signature of function to compute data source from attribute.
This could be generalized to HdDataSourceBaseHandle but we use HdSampledDataSourceHandle as result instead so that we can use the UsdImagingDataSourceAttributeNew function pointer.
Definition at line 70 of file dataSourceMapped.h.
using DataSourceAttributeFactoryFn = std::function<DataSourceAttributeFactory> |
Definition at line 75 of file dataSourceMapped.h.
using DataSourceAttributeFactoryPtr = DataSourceAttributeFactory * |
Definition at line 77 of file dataSourceMapped.h.
|
overridevirtual |
Returns the child datasource of the given name.
This call is expected to be threadsafe.
Implements HdContainerDataSource.
|
overridevirtual |
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.