![]() |
|
Abstract interface for querying and mutating a material network. More...
#include <materialNetworkInterface.h>
Public Types | |
using | InputConnectionVector = TfSmallVector< InputConnection, 4 > |
using | InputConnectionResult = std::pair< bool, InputConnection > |
Public Member Functions | |
virtual SdfPath | GetMaterialPrimPath () const =0 |
virtual std::string | GetModelAssetName () const =0 |
Returns the nearest enclosing model asset name, as described by the model schema, or empty string if none is available. | |
virtual TfTokenVector | GetNodeNames () const =0 |
virtual TfToken | GetNodeType (const TfToken &nodeName) const =0 |
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 type. | |
virtual VtValue | GetNodeTypeInfoValue (const TfToken &nodeName, const TfToken &key) const =0 |
virtual TfTokenVector | GetAuthoredNodeParameterNames (const TfToken &nodeName) const =0 |
virtual VtValue | GetNodeParameterValue (const TfToken &nodeName, const TfToken ¶mName) const =0 |
virtual TfTokenVector | GetNodeInputConnectionNames (const TfToken &nodeName) const =0 |
virtual InputConnectionVector | GetNodeInputConnection (const TfToken &nodeName, const TfToken &inputName) const =0 |
virtual void | DeleteNode (const TfToken &nodeName)=0 |
virtual void | SetNodeType (const TfToken &nodeName, const TfToken &nodeType)=0 |
virtual void | SetNodeParameterValue (const TfToken &nodeName, const TfToken ¶mName, const VtValue &value)=0 |
virtual void | DeleteNodeParameter (const TfToken &nodeName, const TfToken ¶mName)=0 |
virtual void | SetNodeInputConnection (const TfToken &nodeName, const TfToken &inputName, const InputConnectionVector &connections)=0 |
virtual void | DeleteNodeInputConnection (const TfToken &nodeName, const TfToken &inputName)=0 |
virtual TfTokenVector | GetTerminalNames () const =0 |
virtual InputConnectionResult | GetTerminalConnection (const TfToken &terminalName) const =0 |
virtual void | DeleteTerminal (const TfToken &terminalName)=0 |
virtual void | SetTerminalConnection (const TfToken &terminalName, const InputConnection &connection)=0 |
Abstract interface for querying and mutating a material network.
This is useful for implementing matfilt functions which can be reused by future scene index implementations.
NOTE: Subclasses make no guarantee of thread-safety even for the const accessors as they might make use of internal caching for optimization. Should you want to read from a material from multiple threads, create a thread-specific interface instance. The non-const methods should never be considered thread-safe from multiple interface instances backed from the same concrete data.
Definition at line 48 of file materialNetworkInterface.h.
using InputConnectionResult = std::pair<bool, InputConnection> |
Definition at line 121 of file materialNetworkInterface.h.
using InputConnectionVector = TfSmallVector<InputConnection, 4> |
Definition at line 87 of file materialNetworkInterface.h.
|
pure virtual |
Returns the nearest enclosing model asset name, as described by the model schema, or empty string if none is available.
Implemented in HdDataSourceMaterialNetworkInterface, and HdMaterialNetwork2Interface.
|
pure virtual |
Node type info is a collection of data related to the node type, often used to determine the node type.
For now, we only have getters for this, as we aren't really intending on mutating this in any filter.
Implemented in HdDataSourceMaterialNetworkInterface, and HdMaterialNetwork2Interface.
|
pure virtual |
Terminal query & mutation
Implemented in HdDataSourceMaterialNetworkInterface, and HdMaterialNetwork2Interface.