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
28UsdMtlxStandardLibraryPaths();
34UsdMtlxCustomSearchPaths();
48UsdMtlxStandardFileExtensions();
57UsdMtlxReadDocument(
const std::string& resolvedPath);
64MaterialX::ConstDocumentPtr
65UsdMtlxGetDocument(
const std::string& resolvedUri);
70MaterialX::ConstDocumentPtr
71UsdMtlxGetDocumentFromString(
const std::string &mtlxXml);
81UsdMtlxGetVersion(
const MaterialX::ConstInterfaceElementPtr& mtlx,
82 bool* implicitDefault =
nullptr);
90UsdMtlxGetSourceURI(
const MaterialX::ConstElementPtr& element);
126UsdMtlxGetUsdType(
const std::string& mtlxTypeName);
135UsdMtlxGetUsdValue(
const MaterialX::ConstElementPtr& mtlx,
136 bool getDefaultValue =
false);
142UsdMtlxGetPackedUsdValues(
const std::string& values,
const std::string& type);
154std::vector<std::string>
155UsdMtlxSplitStringArray(
const std::string& s);
157PXR_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.
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.