7#ifndef PXR_IMAGING_HD_MATERIAL_NETWORK_INTERFACE_H
8#define PXR_IMAGING_HD_MATERIAL_NETWORK_INTERFACE_H
11#include "pxr/usd/sdf/path.h"
12#include "pxr/base/vt/value.h"
16PXR_NAMESPACE_OPEN_SCOPE
36 virtual SdfPath GetMaterialPrimPath()
const = 0;
44 virtual VtValue GetMaterialConfigValue(
const TfToken& key)
const = 0;
59 GetNodeTypeInfoValue(
const TfToken& nodeName,
const TfToken& key)
const = 0;
62 const TfToken &nodeName)
const = 0;
64 virtual VtValue GetNodeParameterValue(
66 const TfToken ¶mName)
const = 0;
75 virtual NodeParamData GetNodeParameterData(
77 const TfToken ¶mName)
const = 0;
80 const TfToken &nodeName)
const = 0;
82 struct InputConnection
89 virtual InputConnectionVector GetNodeInputConnection(
91 const TfToken &inputName)
const = 0;
93 virtual void DeleteNode(
const TfToken &nodeName) = 0;
95 virtual void SetNodeType(
99 virtual void SetNodeTypeInfoValue(
105 virtual void SetNodeParameterValue(
110 virtual void SetNodeParameterData(
113 const NodeParamData ¶mData) = 0;
115 virtual void DeleteNodeParameter(
119 virtual void SetNodeInputConnection(
122 const InputConnectionVector &connections) = 0;
124 virtual void DeleteNodeInputConnection(
132 using InputConnectionResult = std::pair<bool, InputConnection>;
133 virtual InputConnectionResult GetTerminalConnection(
134 const TfToken &terminalName)
const = 0;
136 virtual void DeleteTerminal(
137 const TfToken &terminalName) = 0;
139 virtual void SetTerminalConnection(
141 const InputConnection &connection) = 0;
145PXR_NAMESPACE_CLOSE_SCOPE
Abstract interface for querying and mutating a material network.
virtual std::string GetModelAssetName() const =0
Returns the nearest enclosing model asset name, as described by the model schema, or empty string if ...
virtual TfTokenVector GetTerminalNames() const =0
virtual TfTokenVector GetMaterialConfigKeys() const =0
Material config is a collection of data related to the entire material, e.g.
virtual TfTokenVector GetNodeTypeInfoKeys(const TfToken &nodeName) const =0
Node type info is a collection of data related to the node type, often used to determine the node typ...
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...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.