Skip to content

Commit 1c7bbfd

Browse files
Align variable names
- Align variable names between interface and implementation in loadLibraries. - Use a single variable name convention in baketextures.py. - Additional script cleanup in baketextures.py.
1 parent 7e6659b commit 1c7bbfd

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

python/Scripts/baketextures.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ def main():
2121
opts = parser.parse_args()
2222

2323
doc = mx.createDocument()
24-
mxversion = mx.getVersionString()
25-
2624
try:
2725
mx.readFromXmlFile(doc, opts.input_filename)
2826
except mx.ExceptionFileMissing as err:
@@ -35,8 +33,8 @@ def main():
3533
searchPath.append(os.path.dirname(opts.input_filename))
3634
libraryFolders = [ "libraries" ]
3735
if opts.paths:
38-
for path_list in opts.paths:
39-
for path in path_list:
36+
for pathList in opts.paths:
37+
for path in pathList:
4038
searchPath.append(path)
4139
if opts.libraries:
4240
for libraryList in opts.libraries:
@@ -46,7 +44,7 @@ def main():
4644
doc.importLibrary(stdlib)
4745

4846
valid, msg = doc.validate()
49-
if (not valid):
47+
if not valid:
5048
print("Validation warnings for input document:")
5149
print(msg)
5250

source/MaterialXFormat/Util.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ void loadLibrary(const FilePath& file,
3737
const FileSearchPath& searchPath = FileSearchPath(),
3838
XmlReadOptions* readOptions = nullptr);
3939

40-
/// Load all MaterialX files with given library names in given search paths.
41-
/// Note that all library files will have a URI set on them.
42-
StringSet loadLibraries(const FilePathVec& libraryNames,
40+
/// Load all MaterialX files within the given library folders into a document,
41+
/// using the given search path to locate the folders on the file system.
42+
StringSet loadLibraries(const FilePathVec& libraryFolders,
4343
const FileSearchPath& searchPath,
4444
DocumentPtr doc,
4545
const StringSet& excludeFiles = StringSet(),

source/PyMaterialX/PyMaterialXFormat/PyUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ void bindPyUtil(py::module& mod)
2121
mod.def("loadLibrary", &mx::loadLibrary,
2222
py::arg("file"), py::arg("doc"), py::arg("searchPath") = mx::FileSearchPath(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
2323
mod.def("loadLibraries", &mx::loadLibraries,
24-
py::arg("libraryNames"), py::arg("searchPath"), py::arg("doc"), py::arg("excludeFiles") = mx::StringSet(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
24+
py::arg("libraryFolders"), py::arg("searchPath"), py::arg("doc"), py::arg("excludeFiles") = mx::StringSet(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
2525
}

0 commit comments

Comments
 (0)