Skip to content

Commit

Permalink
Align variable names
Browse files Browse the repository at this point in the history
- Align variable names between interface and implementation in loadLibraries.
- Use a single variable name convention in baketextures.py.
- Additional script cleanup in baketextures.py.
  • Loading branch information
jstone-lucasfilm committed Sep 6, 2020
1 parent 7e6659b commit 1c7bbfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions python/Scripts/baketextures.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ def main():
opts = parser.parse_args()

doc = mx.createDocument()
mxversion = mx.getVersionString()

try:
mx.readFromXmlFile(doc, opts.input_filename)
except mx.ExceptionFileMissing as err:
Expand All @@ -35,8 +33,8 @@ def main():
searchPath.append(os.path.dirname(opts.input_filename))
libraryFolders = [ "libraries" ]
if opts.paths:
for path_list in opts.paths:
for path in path_list:
for pathList in opts.paths:
for path in pathList:
searchPath.append(path)
if opts.libraries:
for libraryList in opts.libraries:
Expand All @@ -46,7 +44,7 @@ def main():
doc.importLibrary(stdlib)

valid, msg = doc.validate()
if (not valid):
if not valid:
print("Validation warnings for input document:")
print(msg)

Expand Down
6 changes: 3 additions & 3 deletions source/MaterialXFormat/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ void loadLibrary(const FilePath& file,
const FileSearchPath& searchPath = FileSearchPath(),
XmlReadOptions* readOptions = nullptr);

/// Load all MaterialX files with given library names in given search paths.
/// Note that all library files will have a URI set on them.
StringSet loadLibraries(const FilePathVec& libraryNames,
/// Load all MaterialX files within the given library folders into a document,
/// using the given search path to locate the folders on the file system.
StringSet loadLibraries(const FilePathVec& libraryFolders,
const FileSearchPath& searchPath,
DocumentPtr doc,
const StringSet& excludeFiles = StringSet(),
Expand Down
2 changes: 1 addition & 1 deletion source/PyMaterialX/PyMaterialXFormat/PyUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ void bindPyUtil(py::module& mod)
mod.def("loadLibrary", &mx::loadLibrary,
py::arg("file"), py::arg("doc"), py::arg("searchPath") = mx::FileSearchPath(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
mod.def("loadLibraries", &mx::loadLibraries,
py::arg("libraryNames"), py::arg("searchPath"), py::arg("doc"), py::arg("excludeFiles") = mx::StringSet(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
py::arg("libraryFolders"), py::arg("searchPath"), py::arg("doc"), py::arg("excludeFiles") = mx::StringSet(), py::arg("readOptions") = (mx::XmlReadOptions*) nullptr);
}

0 comments on commit 1c7bbfd

Please sign in to comment.