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> 21 PXR_NAMESPACE_OPEN_SCOPE
28 UsdMtlxStandardLibraryPaths();
34 UsdMtlxCustomSearchPaths();
48 UsdMtlxStandardFileExtensions();
56 MaterialX::DocumentPtr
57 UsdMtlxReadDocument(
const std::string& resolvedPath);
64 MaterialX::ConstDocumentPtr
65 UsdMtlxGetDocument(
const std::string& resolvedUri);
70 MaterialX::ConstDocumentPtr
71 UsdMtlxGetDocumentFromString(
const std::string &mtlxXml);
81 UsdMtlxGetVersion(
const MaterialX::ConstInterfaceElementPtr& mtlx,
82 bool* implicitDefault =
nullptr);
90 UsdMtlxGetSourceURI(
const MaterialX::ConstElementPtr& element);
126 UsdMtlxGetUsdType(
const std::string& mtlxTypeName);
135 UsdMtlxGetUsdValue(
const MaterialX::ConstElementPtr& mtlx,
136 bool getDefaultValue =
false);
142 UsdMtlxGetPackedUsdValues(
const std::string& values,
const std::string& type);
154 std::vector<std::string>
155 UsdMtlxSplitStringArray(
const std::string& s);
157 PXR_NAMESPACE_CLOSE_SCOPE
159 #endif // PXR_USD_USDMTLX_UTILS_H Represents a value type name, i.e.
TfToken shaderPropertyType
The exact SdrShaderProperty type name.
Token for efficient comparison, assignment, and hashing of known strings.
This file defines some macros that are useful for declaring and using static TfTokens.
int arraySize
If the value type is a fixed-size array/tuple, this will be greater then zero.
SdfValueTypeName valueTypeName
The value type name that most closely matches the MaterialX type.
Result of UsdMtlxGetUsdType().
bool valueTypeNameIsExact
true iff the value type name is an exact match to the MaterialX type.
Provides a container which may hold any type, and provides introspection and iteration over array typ...