8#ifndef PXR_USD_USDMTLX_UTILS_H
9#define PXR_USD_USDMTLX_UTILS_H
12#include "pxr/usd/usdMtlx/api.h"
14#include "pxr/usd/sdf/valueTypeName.h"
16#include "pxr/base/vt/value.h"
17#include <MaterialXCore/Document.h>
21PXR_NAMESPACE_OPEN_SCOPE
23#define USD_MTLX_TOKENS \
24 ((DefaultOutputName, "out"))
33UsdMtlxStandardLibraryPaths();
39UsdMtlxCustomSearchPaths();
53UsdMtlxStandardFileExtensions();
62UsdMtlxReadDocument(
const std::string& resolvedPath);
69MaterialX::ConstDocumentPtr
70UsdMtlxGetDocument(
const std::string& resolvedUri);
75MaterialX::ConstDocumentPtr
76UsdMtlxGetDocumentFromString(
const std::string &mtlxXml);
86UsdMtlxGetVersion(
const MaterialX::ConstInterfaceElementPtr& mtlx,
87 bool* implicitDefault =
nullptr);
95UsdMtlxGetSourceURI(
const MaterialX::ConstElementPtr& element);
131UsdMtlxGetUsdType(
const std::string& mtlxTypeName);
140UsdMtlxGetUsdValue(
const MaterialX::ConstElementPtr& mtlx,
141 bool getDefaultValue =
false);
147UsdMtlxGetPackedUsdValues(
const std::string& values,
const std::string& type);
159std::vector<std::string>
160UsdMtlxSplitStringArray(
const std::string& s);
162PXR_NAMESPACE_CLOSE_SCOPE
Represents a value type name, i.e.
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...
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Result of UsdMtlxGetUsdType().
TfToken shaderPropertyType
The exact SdrShaderProperty type name.
int arraySize
If the value type is a fixed-size array/tuple, this will be greater then zero.
bool valueTypeNameIsExact
true iff the value type name is an exact match to the MaterialX type.
SdfValueTypeName valueTypeName
The value type name that most closely matches the MaterialX type.
Common typedefs that are used throughout the NDR library.