MaterialX 1.38.2
Util.h
Go to the documentation of this file.
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_FORMAT_UTIL_H
7#define MATERIALX_FORMAT_UTIL_H
8
11
15
19
20namespace MaterialX
21{
22
25MX_FORMAT_API string readFile(const FilePath& file);
26
28MX_FORMAT_API void getSubdirectories(const FilePathVec& rootDirectories, const FileSearchPath& searchPath, FilePathVec& subDirectories);
29
31MX_FORMAT_API void loadDocuments(const FilePath& rootPath,
32 const FileSearchPath& searchPath,
33 const StringSet& skipFiles,
34 const StringSet& includeFiles,
35 vector<DocumentPtr>& documents,
36 StringVec& documentsPaths,
37 const XmlReadOptions* readOptions = nullptr,
38 StringVec* errors = nullptr);
39
41MX_FORMAT_API void loadLibrary(const FilePath& file,
42 DocumentPtr doc,
43 const FileSearchPath& searchPath = FileSearchPath(),
44 const XmlReadOptions* readOptions = nullptr);
45
48MX_FORMAT_API StringSet loadLibraries(const FilePathVec& libraryFolders,
49 const FileSearchPath& searchPath,
50 DocumentPtr doc,
51 const StringSet& excludeFiles = StringSet(),
52 const XmlReadOptions* readOptions = nullptr);
53
59MX_FORMAT_API void flattenFilenames(DocumentPtr doc, const FileSearchPath& searchPath = FileSearchPath(), StringResolverPtr customResolver = nullptr);
60
61} // namespace MaterialX
62
63#endif
The top-level Document class.
Base and generic element classes.
Cross-platform support for file and search paths.
Interface element subclasses.
std::set< string > StringSet
A set of strings.
Definition: Library.h:60
Macros for declaring imported and exported symbols.
Support for the MTLX file format.