MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / getSourceSearchPath

Function getSourceSearchPath

source/MaterialXFormat/Util.cpp:208–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208FileSearchPath getSourceSearchPath(ConstDocumentPtr doc)
209{
210 StringSet pathSet;
211 for (ConstElementPtr elem : doc->traverseTree())
212 {
213 if (elem->hasSourceUri())
214 {
215 FilePath sourceFilename = FilePath(elem->getSourceUri());
216 pathSet.insert(sourceFilename.getParentPath());
217 }
218 }
219
220 FileSearchPath searchPath;
221 for (FilePath path : pathSet)
222 {
223 searchPath.append(path);
224 }
225
226 return searchPath;
227}
228
229FileSearchPath getDefaultDataSearchPath()
230{

Callers 3

updateMaterialsMethod · 0.85
initializeMethod · 0.85
loadDocumentMethod · 0.85

Calls 4

FilePathFunction · 0.85
traverseTreeMethod · 0.80
insertMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected