HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reader.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_USDMTLX_READER_H
8 #define PXR_USD_USDMTLX_READER_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/usd/usdMtlx/api.h"
12 #include "pxr/usd/sdf/path.h"
14 #include <MaterialXCore/Document.h>
15 
17 
19 
20 /// Translate the MaterialX document in \p mtlx into the stage \p stage.
21 /// \p internalPath is a namespace path where converted MaterialX objects
22 /// will live. \p externalPath is a namespace path of a prim that will
23 /// have all of the look variants. It will have references into
24 /// \p internalPath. Clients are expected to reference the prim at
25 /// \p externalPath to apply looks.
26 ///
27 /// Note that this method will traverse the materialx network following material
28 /// nodes, and does an early exit if no looks are defined in the mtlx document.
31  const UsdStagePtr& stage,
32  const SdfPath& internalPath = SdfPath("/MaterialX"),
33  const SdfPath& externalPath = SdfPath("/ModelRoot"));
34 
35 /// Translate node graphs in the MaterialX document in \p mtlx into the
36 /// stage \p stage. \p internalPath is a namespace path where converted
37 /// MaterialX objects will live.
38 ///
39 /// Note that this method will traverse all the nodegraphs in the mtlx document.
42  const UsdStagePtr& stage,
43  const SdfPath& internalPath = SdfPath("/MaterialX"));
44 
46 
47 #endif // PXR_USD_USDMTLX_READER_H
USDMTLX_API void UsdMtlxRead(const MaterialX::ConstDocumentPtr &mtlx, const UsdStagePtr &stage, const SdfPath &internalPath=SdfPath("/MaterialX"), const SdfPath &externalPath=SdfPath("/ModelRoot"))
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_PTRS(UsdStage)
Definition: path.h:273
USDMTLX_API void UsdMtlxReadNodeGraphs(const MaterialX::ConstDocumentPtr &mtlx, const UsdStagePtr &stage, const SdfPath &internalPath=SdfPath("/MaterialX"))
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
#define USDMTLX_API
Definition: api.h:23
shared_ptr< const Document > ConstDocumentPtr
A shared pointer to a const Document.
Definition: Document.h:24