MaterialXJSON 1.39.0
|
Utility class for MaterialX JSON. More...
Static Public Member Functions | |
dict | readJson (str fileName) |
Read a JSON file. | |
dict | jsonStringToJson (str jsonString) |
Convert a JSON string to a JSON document. | |
str | jsonToJSONString (dict jsonObject, indentation=2) |
Convert a JSON document to a JSON string. | |
str | documentToXMLString (mx.Document doc) |
Convert a MaterialX document to XML string. | |
None | xmlStringToDocument (mx.Document doc, str xmlString) |
Convert an XML string to a MaterialX document. | |
None | writeJson (dict jsonObject, str fileName, indentation=2) |
Write a JSON document to file. | |
list | getFiles (str rootPath, str extension) |
Get all files with the given extension from the given root path. | |
tuple | loadLibraries (mx.FileSearchPath searchPath, list libraryFolders) |
Load all libraries from the given search path and library folders. | |
mx.Document | jsonFileToXml (str fileName, JsonReadOptions readOptions=None) |
Convert a JSON file to an XML file. | |
bool | jsonFileToXmlFile (str fileName, str outputFilename, JsonReadOptions readOptions=None) |
Convert a JSON file to an XML file. | |
None | xmlFileToJsonFile (str xmlFileName, str jsonFileName, JsonWriteOptions writeOptions=None) |
Convert an MaterialX XML file to a JSON file. | |
|
static |
Convert a MaterialX document to XML string.
doc | The MaterialX document to convert |
Definition at line 284 of file core.py.
|
static |
Get all files with the given extension from the given root path.
rootPath | The root path to search from |
extension | The extension to search for |
Definition at line 312 of file core.py.
|
static |
Convert a JSON file to an XML file.
fileName | The file name to read from |
readOptions | The read options to use. Default is None |
Definition at line 346 of file core.py.
|
static |
Convert a JSON file to an XML file.
fileName | The file name to read from |
outputFilename | The file name to write to |
readOptions | The read options to use. Default is None |
Definition at line 370 of file core.py.
|
static |
Convert a JSON string to a JSON document.
jsonString | The JSON string to convert |
Definition at line 266 of file core.py.
|
static |
Convert a JSON document to a JSON string.
jsonObject | The JSON document to convert |
Definition at line 275 of file core.py.
|
static |
Load all libraries from the given search path and library folders.
searchPath | The search path to use |
libraryFolders | The library folders to use |
Definition at line 328 of file core.py.
|
static |
Read a JSON file.
fileName | The file name to read |
Definition at line 249 of file core.py.
|
static |
Write a JSON document to file.
jsonObject | The JSON document to write |
fileName | The file name to write to |
Definition at line 302 of file core.py.
|
static |
Convert an MaterialX XML file to a JSON file.
xmlFileName | The XML file to read from |
jsonFileName | The JSON file to write to |
writeOptions | The write options to use. Default is None |
Definition at line 397 of file core.py.
|
static |
Convert an XML string to a MaterialX document.
doc | The MaterialX document to write to |
xmlString | The XML string to convert |
Definition at line 293 of file core.py.