24 #ifndef HD_DATA_SOURCE_MATERIAL_NETWORK_INTERFACE_H
25 #define HD_DATA_SOURCE_MATERIAL_NETWORK_INTERFACE_H
33 #include <unordered_map>
34 #include <unordered_set>
51 const SdfPath &materialPrimPath,
52 const HdContainerDataSourceHandle &networkContainer,
53 const HdContainerDataSourceHandle &primContainer)
54 : _materialPrimPath(materialPrimPath)
55 , _networkSchema(networkContainer)
56 , _networkEditor(networkContainer)
57 , _primContainer(primContainer)
58 , _nodesSchema(nullptr)
59 , _lastAccessedNodeSchema(nullptr)
60 , _lastAccessedNodeParametersSchema(nullptr)
61 , _lastAccessedNodeConnectionsSchema(nullptr)
66 return _materialPrimPath;
86 const TfToken &nodeName)
const override;
91 const TfToken ¶mName)
const override;
96 const TfToken ¶mName)
const override;
100 const TfToken &nodeName)
const override;
105 const TfToken &inputName)
const override;
113 const TfToken &nodeType)
override;
125 const NodeParamData ¶mData)
override;
130 const TfToken ¶mName)
override;
141 const TfToken &inputName)
override;
148 const TfToken &terminalName)
const override;
152 const TfToken &terminalName)
override;
157 const InputConnection &connection)
override;
160 HdContainerDataSourceHandle
Finish();
163 HdContainerDataSourceHandle _GetNodeTypeInfo(
164 const TfToken& nodeName)
const;
170 using _TokenSet = std::unordered_set<TfToken, TfHash>;
174 const HdDataSourceBaseHandle &ds);
179 HdContainerDataSourceHandle _primContainer;
180 _OverrideMap _existingOverrides;
181 _TokenSet _overriddenNodes;
182 _TokenSet _deletedNodes;
183 bool _terminalsOverridden =
false;
187 const TfToken &nodeName)
const;
189 const TfToken &nodeName)
const;
191 const TfToken &nodeName)
const;
196 mutable TfToken _lastAccessedNodeName;
206 #endif // HD_DATA_SOURCE_MATERIAL_NETWORK_INTERFACE_H
HdDataSourceMaterialNetworkInterface(const SdfPath &materialPrimPath, const HdContainerDataSourceHandle &networkContainer, const HdContainerDataSourceHandle &primContainer)
HD_API void DeleteNode(const TfToken &nodeName) override
HD_API void SetNodeParameterData(const TfToken &nodeName, const TfToken ¶mName, const NodeParamData ¶mData) override
HD_API VtValue GetNodeParameterValue(const TfToken &nodeName, const TfToken ¶mName) const override
HD_API void DeleteNodeInputConnection(const TfToken &nodeName, const TfToken &inputName) override
GLsizei const GLchar *const * string
HD_API TfTokenVector GetNodeNames() const override
HD_API HdMaterialNetworkInterface::NodeParamData GetNodeParameterData(const TfToken &nodeName, const TfToken ¶mName) const override
HD_API TfToken GetNodeType(const TfToken &nodeName) const override
HD_API void SetNodeType(const TfToken &nodeName, const TfToken &nodeType) override
HD_API TfTokenVector GetNodeTypeInfoKeys(const TfToken &nodeName) const override
HD_API HdContainerDataSourceHandle Finish()
HD_API SdfPath GetMaterialPrimPath() const override
HD_API void DeleteNodeParameter(const TfToken &nodeName, const TfToken ¶mName) override
HD_API void SetNodeParameterValue(const TfToken &nodeName, const TfToken ¶mName, const VtValue &value) override
HD_API VtValue GetNodeTypeInfoValue(const TfToken &nodeName, const TfToken &value) const override
std::vector< TfToken > TfTokenVector
Convenience types.
HD_API void DeleteTerminal(const TfToken &terminalName) override
HD_API TfTokenVector GetNodeInputConnectionNames(const TfToken &nodeName) const override
HD_API InputConnectionResult GetTerminalConnection(const TfToken &terminalName) const override
HD_API TfTokenVector GetTerminalNames() const override
TfSmallVector< InputConnection, 4 > InputConnectionVector
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HD_API void SetNodeInputConnection(const TfToken &nodeName, const TfToken &inputName, const InputConnectionVector &connections) override
HD_API InputConnectionVector GetNodeInputConnection(const TfToken &nodeName, const TfToken &inputName) const override
#define PXR_NAMESPACE_CLOSE_SCOPE
HD_API TfTokenVector GetAuthoredNodeParameterNames(const TfToken &nodeName) const override
HD_API std::string GetModelAssetName() const override
HD_API void SetTerminalConnection(const TfToken &terminalName, const InputConnection &connection) override
std::pair< bool, InputConnection > InputConnectionResult