25 #ifndef PXR_USD_USDMTLX_UTILS_H 26 #define PXR_USD_USDMTLX_UTILS_H 29 #include "pxr/usd/usdMtlx/api.h" 31 #include "pxr/usd/sdf/valueTypeName.h" 33 #include "pxr/base/vt/value.h" 34 #include <MaterialXCore/Document.h> 38 PXR_NAMESPACE_OPEN_SCOPE
40 #define USD_MTLX_TOKENS \ 41 ((DefaultOutputName, "out")) 50 UsdMtlxStandardLibraryPaths();
56 UsdMtlxCustomSearchPaths();
70 UsdMtlxStandardFileExtensions();
78 MaterialX::DocumentPtr
79 UsdMtlxReadDocument(
const std::string& resolvedPath);
86 MaterialX::ConstDocumentPtr
87 UsdMtlxGetDocument(
const std::string& resolvedUri);
92 MaterialX::ConstDocumentPtr
93 UsdMtlxGetDocumentFromString(
const std::string &mtlxXml);
103 UsdMtlxGetVersion(
const MaterialX::ConstInterfaceElementPtr& mtlx,
104 bool* implicitDefault =
nullptr);
112 UsdMtlxGetSourceURI(
const MaterialX::ConstElementPtr& element);
148 UsdMtlxGetUsdType(
const std::string& mtlxTypeName);
157 UsdMtlxGetUsdValue(
const MaterialX::ConstElementPtr& mtlx,
158 bool getDefaultValue =
false);
164 UsdMtlxGetPackedUsdValues(
const std::string& values,
const std::string& type);
176 std::vector<std::string>
177 UsdMtlxSplitStringArray(
const std::string& s);
179 PXR_NAMESPACE_CLOSE_SCOPE
181 #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.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
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...