HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hdMtlx.h File Reference
#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>
+ Include dependency graph for hdMtlx.h:

Go to the source code of this file.

Classes

struct  HdMtlxTexturePrimvarData
 

Typedefs

using DocumentPtr = std::shared_ptr< class Document >
 

Functions

HDMTLX_API const
MaterialX::FileSearchPath & 
HdMtlxSearchPaths ()
 
HDMTLX_API std::string HdMtlxConvertToString (VtValue const &hdParameterValue)
 Converts the HdParameterValue to a string MaterialX can understand. More...
 
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...
 

Typedef Documentation

using DocumentPtr = std::shared_ptr<class Document>

Definition at line 38 of file hdMtlx.h.

Function Documentation

HDMTLX_API std::string HdMtlxConvertToString ( VtValue const hdParameterValue)

Converts the HdParameterValue to a string MaterialX can understand.

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.

HDMTLX_API MaterialX::DocumentPtr HdMtlxCreateMtlxDocumentFromHdNetwork ( HdMaterialNetwork2 const hdNetwork,
HdMaterialNode2 const hdMaterialXNode,
SdfPath const hdMaterialXNodePath,
SdfPath const materialPath,
MaterialX::DocumentPtr const libraries,
HdMtlxTexturePrimvarData mxHdData = nullptr 
)

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.

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.