Loading...
Searching...
No Matches
dataSourceMaterial.h
1//
2// Copyright 2022 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MATERIAL_H
8#define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MATERIAL_H
9
10#include "pxr/imaging/hd/dataSource.h"
11
12#include "pxr/usd/usd/prim.h"
13
14#include "pxr/usdImaging/usdImaging/dataSourcePrim.h"
15#include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
16
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21// ----------------------------------------------------------------------------
22
30{
31public:
32 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMaterial);
33
35 HdDataSourceBaseHandle Get(const TfToken &name) override;
36
38
39private:
45 const UsdPrim &usdPrim,
46 const UsdImagingDataSourceStageGlobals &stageGlobals,
47 const TfToken &fixedTerminalName = TfToken()
48 );
49
50private:
51 const UsdPrim _usdPrim;
52 const UsdImagingDataSourceStageGlobals &_stageGlobals;
53 const TfToken _fixedTerminalName;
54};
55
56HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMaterial);
57
58// ----------------------------------------------------------------------------
59
65{
66public:
67 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMaterialPrim);
68
70 HdDataSourceBaseHandle Get(const TfToken &name) override;
71
73
74 static HdDataSourceLocatorSet Invalidate(
75 const UsdPrim &prim,
76 const TfToken &subprim,
77 const TfTokenVector &properties,
78 UsdImagingPropertyInvalidationType invalidationType);
79
80private:
81 USDIMAGING_API
83 const SdfPath &sceneIndexPath,
84 const UsdPrim &usdPrim,
85 const UsdImagingDataSourceStageGlobals &stageGlobals);
86};
87
88HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMaterialPrim);
89
90PXR_NAMESPACE_CLOSE_SCOPE
91
92#endif //PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_MATERIAL_H
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
Definition: dataSource.h:99
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
A data source mapping for data source material.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
A prim data source mapping for a UsdShadeMaterial prim.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
Data source representing a basic USD prim.
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 ...
Definition: prim.h:117
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440