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/api.h"
15#include "pxr/usdImaging/usdImaging/dataSourcePrim.h"
16#include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h"
17
19
20PXR_NAMESPACE_OPEN_SCOPE
21
22// ----------------------------------------------------------------------------
23
31{
32public:
33 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMaterial);
34
36 HdDataSourceBaseHandle Get(const TfToken &name) override;
37
39
40private:
45 USDIMAGING_API
47 const UsdPrim &usdPrim,
48 const UsdImagingDataSourceStageGlobals &stageGlobals,
49 const TfToken &fixedTerminalName = TfToken()
50 );
51
52private:
53 const UsdPrim _usdPrim;
54 const UsdImagingDataSourceStageGlobals &_stageGlobals;
55 const TfToken _fixedTerminalName;
56};
57
58HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMaterial);
59
60// ----------------------------------------------------------------------------
61
67{
68public:
69 HD_DECLARE_DATASOURCE(UsdImagingDataSourceMaterialPrim);
70
72 HdDataSourceBaseHandle Get(const TfToken &name) override;
73
75
76 static HdDataSourceLocatorSet Invalidate(
77 const UsdPrim &prim,
78 const TfToken &subprim,
79 const TfTokenVector &properties,
80 UsdImagingPropertyInvalidationType invalidationType);
81
82private:
83 USDIMAGING_API
85 const SdfPath &sceneIndexPath,
86 const UsdPrim &usdPrim,
87 const UsdImagingDataSourceStageGlobals &stageGlobals);
88};
89
90HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceMaterialPrim);
91
92PXR_NAMESPACE_CLOSE_SCOPE
93
94#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:100
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