|
MaterialXglTF 1.39.5
|
Basic I/O Utilities. More...
Static Public Member Functions | |
| tuple[mx.Document, list] | createMaterialXDoc () |
| Utility to create a MaterialX document with the default libraries loaded. | |
| bool | skipLibraryElement (elem) |
| Utility to skip library elements when iterating over elements in a document. | |
| writeMaterialXDoc (doc, filename, predicate=skipLibraryElement) | |
| Utility to write a MaterialX document to a file. | |
| writeMaterialXZip (doc, mtlx_filename, zip_filename, image_references, predicate=skipLibraryElement) | |
| Utility to write a MaterialX document and its referenced images to a zip file. | |
| writeMaterialXStringZip (mtlx_str, mtlx_filename, zip_filename, image_references, predicate=skipLibraryElement) | |
| Utility to write a MaterialX document and its referenced images to a zip file. | |
| writeMaterialXDocString (doc, predicate=skipLibraryElement) | |
| Utility to write a MaterialX document to string. | |
| list | makeFilePathsRelative (doc, docPath) |
| Utility to make file paths relative to a document path. | |
|
static |
Utility to create a MaterialX document with the default libraries loaded.
Definition at line 37 of file core.py.
|
static |
Utility to make file paths relative to a document path.
| doc | The MaterialX document to update. |
| docPath | The path to make file paths relapy -tive to. |
Definition at line 122 of file core.py.
|
static |
Utility to skip library elements when iterating over elements in a document.
Definition at line 52 of file core.py.
|
static |
Utility to write a MaterialX document to a file.
| doc | The MaterialX document to write. |
| filename | The name of the file to write to. |
| predicate | A predicate function to determine if an element should be written. Default is to skip library elements. |
Definition at line 60 of file core.py.
|
static |
Utility to write a MaterialX document to string.
| doc | The MaterialX document to write. |
| predicate | A predicate function to determine if an element should be written. Default is to skip library elements. |
Definition at line 107 of file core.py.
|
static |
Utility to write a MaterialX document and its referenced images to a zip file.
| mtlx_str | The MaterialX document string to write. |
| mtlx_filename | The name of the MaterialX file to write within the zip file. |
| zip_filename | The name of the zip file to write to. |
| image_references | The list of image file references to include in the zip file. |
| predicate | A predicate function to determine if an element should be written. Default is to skip library elements. |
Definition at line 88 of file core.py.
|
static |
Utility to write a MaterialX document and its referenced images to a zip file.
| doc | The MaterialX document to write. |
| mtlx_filename | The name of the MaterialX file to write within the zip file. |
| zip_filename | The name of the zip file to write to. |
| image_references | The list of image file references to include in the zip file. |
| predicate | A predicate function to determine if an element should be written. Default is to skip library elements. |
Definition at line 75 of file core.py.