7#ifndef PXR_IMAGING_HD_MTLX_HDMTLX_H
8#define PXR_IMAGING_HD_MTLX_HDMTLX_H
12#include "pxr/imaging/hdMtlx/api.h"
15#include <unordered_map>
17#include <MaterialXCore/Library.h>
19MATERIALX_NAMESPACE_BEGIN
21 using DocumentPtr = std::shared_ptr<class Document>;
22 using NodeDefPtr = std::shared_ptr<class NodeDef>;
23MATERIALX_NAMESPACE_END
25PXR_NAMESPACE_OPEN_SCOPE
38const MaterialX::FileSearchPath&
44const MaterialX::DocumentPtr&
50HdMtlxConvertToString(
VtValue const& hdParameterValue);
53struct HdMtlxTexturePrimvarData {
54 HdMtlxTexturePrimvarData() =
default;
55 using TextureMap = std::map<std::string, std::set<std::string>>;
56 TextureMap mxHdTextureMap;
57 std::set<SdfPath> hdTextureNodes;
58 std::set<SdfPath> hdPrimvarNodes;
63HdMtlxCreateNameFromPath(
SdfPath const& path);
74 MaterialX::DocumentPtr
const& mxDoc=
nullptr);
80HdMtlxGetNodeDefName(std::string
const& prevMxNodeDefName);
86HdMtlxGetMxTerminalName(
88 TfToken const& hdTerminalNodeName);
94HdMtlxGetMxTerminalName(std::string
const& mxTerminalType);
100MaterialX::DocumentPtr
101HdMtlxCreateMtlxDocumentFromHdNetwork(
104 SdfPath const& hdMaterialXNodePath,
106 MaterialX::DocumentPtr
const& libraries,
107 HdMtlxTexturePrimvarData *mxHdData =
nullptr);
111MaterialX::DocumentPtr
112HdMtlxCreateMtlxDocumentFromHdMaterialNetworkInterface(
114 TfToken const& terminalNodeName,
116 MaterialX::DocumentPtr
const& libraries,
117 HdMtlxTexturePrimvarData *mxHdData =
nullptr);
119PXR_NAMESPACE_CLOSE_SCOPE
Abstract interface for querying and mutating a material network.
A path value used to locate objects in layers or scenegraphs.
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,...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.