7#ifndef HD_MATERIAL_NETWORK_2_INTERFACE_H
8#define HD_MATERIAL_NETWORK_2_INTERFACE_H
11#include "pxr/imaging/hd/api.h"
12#include "pxr/imaging/hd/material.h"
13#include "pxr/imaging/hd/materialNetworkInterface.h"
15PXR_NAMESPACE_OPEN_SCOPE
28 const SdfPath &materialPrimPath,
30 : _materialPrimPath(materialPrimPath)
31 , _materialNetwork(materialNetwork)
32 , _lastAccessedNode(
nullptr)
36 SdfPath GetMaterialPrimPath()
const override {
37 return _materialPrimPath;
65 const TfToken &nodeName)
const override;
70 const TfToken ¶mName)
const override;
73 NodeParamData GetNodeParameterData(
75 const TfToken ¶mName)
const override;
79 const TfToken &nodeName)
const override;
84 const TfToken &inputName)
const override;
87 void DeleteNode(
const TfToken &nodeName)
override;
92 const TfToken &nodeType)
override;
95 virtual void SetNodeTypeInfoValue(
101 void SetNodeParameterValue(
104 const VtValue &value)
override;
107 void SetNodeParameterData(
110 const NodeParamData ¶mData)
override;
113 void DeleteNodeParameter(
115 const TfToken ¶mName)
override;
118 void SetNodeInputConnection(
124 void DeleteNodeInputConnection(
126 const TfToken &inputName)
override;
132 InputConnectionResult GetTerminalConnection(
133 const TfToken &terminalName)
const override;
136 void DeleteTerminal(
const TfToken &terminalName)
override;
139 void SetTerminalConnection(
141 const InputConnection &connection)
override;
146 mutable TfToken _lastAccessedNodeName;
156PXR_NAMESPACE_CLOSE_SCOPE
Implements HdMaterialNetworkInterface interface backed by an HdMaterialNetwork2 – which is useful for...
HD_API TfTokenVector GetMaterialConfigKeys() const override
Material config is a collection of data related to the entire material, e.g.
HD_API TfTokenVector GetTerminalNames() const override
HD_API std::string GetModelAssetName() const override
Returns the nearest enclosing model asset name, as described by the model schema, or empty string if ...
HD_API TfTokenVector GetNodeTypeInfoKeys(const TfToken &nodeName) const override
Node type info is a collection of data related to the node type, often used to determine the node typ...
Abstract interface for querying and mutating a material network.
A path value used to locate objects in layers or scenegraphs.
This is a small-vector class with local storage optimization, the local storage can be specified via ...
Token for efficient comparison, assignment, and hashing of known strings.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Container of nodes and top-level terminal connections.
Describes an instance of a node within a network A node contains a (shader) type identifier,...
std::vector< TfToken > TfTokenVector
Convenience types.