MaterialXJSON 1.39.0
|
Class for handling read and write of MaterialX from and to JSON. More...
Public Member Functions | |
dict | elementToJSON (self, mx.Element elem, dict jsonParent, JsonWriteOptions writeOptions=None) |
Convert an MaterialX XML element to JSON. | |
dict | documentToJSON (self, mx.Document doc, JsonWriteOptions writeOptions=None) |
Convert an MaterialX XML document to JSON. | |
str | documentToJSONString (self, mx.Document doc, JsonWriteOptions writeOptions=None) |
Convert an MaterialX XML document to JSON string. | |
None | elementFromJSON (self, dict node, mx.Element elem, JsonReadOptions readOptions=None) |
Convert an JSON element to MaterialX. | |
bool | documentFromJSON (self, dict jsonDoc, mx.Document doc, JsonReadOptions readOptions=None) |
Convert a JSON document to MaterialX. | |
bool | documentFromJSONString (self, str jsonString, mx.Document doc, JsonReadOptions readOptions=None) |
Convert a JSON document to MaterialX. | |
Class for handling read and write of MaterialX from and to JSON.
bool materialxjson.core.MaterialXJson.documentFromJSON | ( | self, | |
dict | jsonDoc, | ||
mx.Document | doc, | ||
JsonReadOptions | readOptions = None ) |
Convert a JSON document to MaterialX.
jsonDoc | The JSON document to read |
doc | The MaterialX document to write to |
readOptions | The read options to use. Default is None |
Definition at line 205 of file core.py.
bool materialxjson.core.MaterialXJson.documentFromJSONString | ( | self, | |
str | jsonString, | ||
mx.Document | doc, | ||
JsonReadOptions | readOptions = None ) |
Convert a JSON document to MaterialX.
jsonString | The JSON string to read |
doc | The MaterialX document to write to |
readOptions | The read options to use. Default is None |
Definition at line 230 of file core.py.
dict materialxjson.core.MaterialXJson.documentToJSON | ( | self, | |
mx.Document | doc, | ||
JsonWriteOptions | writeOptions = None ) |
Convert an MaterialX XML document to JSON.
doc | The MaterialX document to convert |
writeOptions | The write options to use. Default is None |
Definition at line 120 of file core.py.
str materialxjson.core.MaterialXJson.documentToJSONString | ( | self, | |
mx.Document | doc, | ||
JsonWriteOptions | writeOptions = None ) |
Convert an MaterialX XML document to JSON string.
doc | The MaterialX document to convert |
writeOptions | The write options to use. Default is None |
Definition at line 149 of file core.py.
None materialxjson.core.MaterialXJson.elementFromJSON | ( | self, | |
dict | node, | ||
mx.Element | elem, | ||
JsonReadOptions | readOptions = None ) |
Convert an JSON element to MaterialX.
node | The JSON element to read |
elem | The MaterialX element to write to |
readOptions | The read options to use. Default is None |
Definition at line 168 of file core.py.
dict materialxjson.core.MaterialXJson.elementToJSON | ( | self, | |
mx.Element | elem, | ||
dict | jsonParent, | ||
JsonWriteOptions | writeOptions = None ) |
Convert an MaterialX XML element to JSON.
Will recursively traverse the parent/child Element hierarchy.
elem | The MaterialX element to convert |
jsonParent | The JSON element append to |
writeOptions | The write options to use. Default is None |
Definition at line 67 of file core.py.