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

Function _loadLibraries

python/Scripts/genmdl.py:36–43  ·  view source on GitHub ↗
(doc, searchPath, libraryPath)

Source from the content-addressed store, hash-verified

34 doc.importLibrary(libDoc)
35
36def _loadLibraries(doc, searchPath, libraryPath):
37 librarySubPaths = _getSubDirectories(libraryPath)
38 librarySubPaths.append(libraryPath)
39 for path in librarySubPaths:
40 filenames = _getMTLXFilesInDirectory(os.path.join(libraryPath, path))
41 for filename in filenames:
42 filePath = os.path.join(libraryPath, os.path.join(path, filename))
43 _loadLibrary(filePath, doc)
44
45def _writeHeader(file, version):
46 file.write('mdl ' + version + ';\n')

Callers 1

mainFunction · 0.85

Calls 4

_getSubDirectoriesFunction · 0.85
_getMTLXFilesInDirectoryFunction · 0.85
_loadLibraryFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected