8#ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MAPPED_H
9#define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MAPPED_H
11#include "pxr/usdImaging/usdImaging/dataSourceAttribute.h"
12#include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
14#include "pxr/imaging/hd/dataSource.h"
15#include "pxr/imaging/hd/dataSourceLocator.h"
19PXR_NAMESPACE_OPEN_SCOPE
21namespace UsdImagingDataSourceMapped_Impl
23using _ContainerMappingsSharedPtr = std::shared_ptr<struct _ContainerMappings>;
76 using DataSourceAttributeFactoryFn =
77 std::function<DataSourceAttributeFactory>;
78 using DataSourceAttributeFactoryPtr =
95 DataSourceAttributeFactoryPtr(
96 UsdImagingDataSourceAttributeNew);
99 using DataSourceRelationshipFactory =
104 using DataSourceRelationshipFactoryFn =
105 std::function<DataSourceRelationshipFactory>;
106 using DataSourceRelationshipFactoryPtr =
107 DataSourceRelationshipFactory *;
111 const DataSourceRelationshipFactoryFn&
112 GetPathFromRelationshipDataSourceFactory();
116 const DataSourceRelationshipFactoryFn&
117 GetPathArrayFromRelationshipDataSourceFactory();
127 using PropertyMapping =
128 std::variant<AttributeMapping, RelationshipMapping>;
139 const std::vector<PropertyMapping> &mappings,
148 using _ContainerMappingsSharedPtr =
149 UsdImagingDataSourceMapped_Impl::_ContainerMappingsSharedPtr;
152 std::vector<PropertyMappingBase> _absoluteMappings;
154 _ContainerMappingsSharedPtr _containerMappings;
173 using _ContainerMappingsSharedPtr =
174 UsdImagingDataSourceMapped_Impl::_ContainerMappingsSharedPtr;
186 const _ContainerMappingsSharedPtr &containerMappings,
191 _ContainerMappingsSharedPtr
const _containerMappings;
195PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Represents an object that can identify the location of a data source.
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Specify how attributes on given Usd prim maps to data sources in this (nested) container data source.
USDIMAGING_API PropertyMappings(const std::vector< PropertyMapping > &mappings, const HdDataSourceLocator &datasourcePrefix)
dataSourcePrefix is the location of this UsdImagingDataSourceMapped within a prim data source.
A data source that is a (potentially nested) container for the values of the attributes of a given Us...
USDIMAGING_API TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdSampledDataSourceHandle(const UsdAttribute &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) DataSourceAttributeFactory
Signature of function to compute data source from attribute.
USDIMAGING_API HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
This class is used as a context object with global stage information, that gets passed down to dataso...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Specify how an attribute on the given Usd prim maps to a data source in this (nested) container data ...
DataSourceAttributeFactoryFn factory
Function to compute data source from UsdAttribute.
Base class to specify how a property on the given Usd prim maps to a data source in this (nested) con...
HdDataSourceLocator hdLocator
Corresponding location in this data source.
TfToken usdName
Name of attribute on Usd Prim.
Specify how a relationship on the given Usd prim maps to a data source in this (nested) container dat...
DataSourceRelationshipFactoryFn factory
Function to compute data source from UsdRelationship.
std::vector< TfToken > TfTokenVector
Convenience types.