HDK
|
#include "pxr/pxr.h"
#include "pxr/usd/usdMtlx/api.h"
#include "pxr/usd/sdf/path.h"
#include "pxr/base/tf/declarePtrs.h"
#include <MaterialXCore/Document.h>
Go to the source code of this file.
Functions | |
PXR_NAMESPACE_OPEN_SCOPE | TF_DECLARE_WEAK_PTRS (UsdStage) |
USDMTLX_API void | UsdMtlxRead (const MaterialX::ConstDocumentPtr &mtlx, const UsdStagePtr &stage, const SdfPath &internalPath=SdfPath("/MaterialX"), const SdfPath &externalPath=SdfPath("/ModelRoot")) |
USDMTLX_API void | UsdMtlxReadNodeGraphs (const MaterialX::ConstDocumentPtr &mtlx, const UsdStagePtr &stage, const SdfPath &internalPath=SdfPath("/MaterialX")) |
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_PTRS | ( | UsdStage | ) |
USDMTLX_API void UsdMtlxRead | ( | const MaterialX::ConstDocumentPtr & | mtlx, |
const UsdStagePtr & | stage, | ||
const SdfPath & | internalPath = SdfPath("/MaterialX") , |
||
const SdfPath & | externalPath = SdfPath("/ModelRoot") |
||
) |
Translate the MaterialX document in mtlx
into the stage stage
. internalPath
is a namespace path where converted MaterialX objects will live. externalPath
is a namespace path of a prim that will have all of the look variants. It will have references into internalPath
. Clients are expected to reference the prim at externalPath
to apply looks.
Note that this method will traverse the materialx network following material nodes, and does an early exit if no looks are defined in the mtlx document.
USDMTLX_API void UsdMtlxReadNodeGraphs | ( | const MaterialX::ConstDocumentPtr & | mtlx, |
const UsdStagePtr & | stage, | ||
const SdfPath & | internalPath = SdfPath("/MaterialX") |
||
) |
Translate node graphs in the MaterialX document in mtlx
into the stage stage
. internalPath
is a namespace path where converted MaterialX objects will live.
Note that this method will traverse all the nodegraphs in the mtlx document.