#include "pxr/pxr.h"
#include "pxr/base/tf/token.h"
#include "pxr/imaging/hdMtlx/api.h"
#include <memory>
#include <set>
#include <unordered_map>
#include <MaterialXCore/Library.h>
Go to the source code of this file.
|
HDMTLX_API const
MaterialX::FileSearchPath & | HdMtlxSearchPaths () |
| |
HDMTLX_API const
MaterialX::DocumentPtr & | HdMtlxStdLibraries () |
| |
| HDMTLX_API std::string | HdMtlxConvertToString (VtValue const &hdParameterValue) |
| | Converts the HdParameterValue to a string MaterialX can understand. More...
|
| |
| HDMTLX_API std::string | HdMtlxCreateNameFromPath (SdfPath const &path) |
| |
| HDMTLX_API MaterialX::NodeDefPtr | HdMtlxGetNodeDef (TfToken const &hdNodeType, MaterialX::DocumentPtr const &mxDoc=nullptr) |
| |
| HDMTLX_API std::string | HdMtlxGetNodeDefName (std::string const &prevMxNodeDefName) |
| |
| HDMTLX_API std::string | HdMtlxGetMxTerminalName (HdMaterialNetworkInterface *netInterface, TfToken const &hdTerminalNodeName) |
| |
| HDMTLX_API std::string | HdMtlxGetMxTerminalName (std::string const &mxTerminalType) |
| |
| HDMTLX_API MaterialX::DocumentPtr | HdMtlxCreateMtlxDocumentFromHdNetwork (HdMaterialNetwork2 const &hdNetwork, HdMaterialNode2 const &hdMaterialXNode, SdfPath const &hdMaterialXNodePath, SdfPath const &materialPath, MaterialX::DocumentPtr const &libraries, HdMtlxTexturePrimvarData *mxHdData=nullptr) |
| |
| HDMTLX_API MaterialX::DocumentPtr | HdMtlxCreateMtlxDocumentFromHdMaterialNetworkInterface (HdMaterialNetworkInterface *netInterface, TfToken const &terminalNodeName, TfTokenVector const &terminalNodeConnectionNames, MaterialX::DocumentPtr const &libraries, HdMtlxTexturePrimvarData *mxHdData=nullptr) |
| | Implementation that uses the material network interface. More...
|
| |
Converts the HdParameterValue to a string MaterialX can understand.
Creates and returns a MaterialX Document from the given HdMaterialNetwork2 Collecting the hdTextureNodes and hdPrimvarNodes as the network is traversed as well as the Texture name mapping between MaterialX and Hydra.
Get the terminal name used in the MaterialX document based on the Hydra terminal node.
| HDMTLX_API std::string HdMtlxGetMxTerminalName |
( |
std::string const & |
mxTerminalType | ) |
|
Get the terminal name used in the MaterialX document based on the MaterialX terminal node type.
Custom nodes may have their nodeDefs in a separate mtlx file, this function additional looks to the ImplementationURI stored on the sdr to find this mtlx file and nodeDef. This method is preferred over mxDoc->getNodeDef() to catch this custom node case.
| HDMTLX_API std::string HdMtlxGetNodeDefName |
( |
std::string const & |
prevMxNodeDefName | ) |
|
NodeDef names may change between MaterialX versions, this function returns the nodeDef name appropriate for the version of MaterialX being used.
| HDMTLX_API const MaterialX::FileSearchPath& HdMtlxSearchPaths |
( |
| ) |
|
Return the MaterialX search paths. In order, this includes:
- Paths set in the environment variable 'PXR_MTLX_PLUGIN_SEARCH_PATHS'
- Paths set in the environment variable 'PXR_MTLX_STDLIB_SEARCH_PATHS'
- Path to the MaterialX standard library discovered at build time.
Return a MaterialX document with the stdlibraries loaded using the above search paths.