PyMaterialXFormat

Cross-platform support for document serialization and file utilities.

Classes

FilePath

A generic file path, supporting both syntactic and file system operations.

FileSearchPath

A sequence of file paths, which may be queried to find the first instance of a given filename on the file system.

Format

Enumeration of FilePath formats.

Type

Enumeration of FilePath types.

XmlReadOptions

A set of options for controlling the behavior of XML read functions.

XmlWriteOptions

A set of options for controlling the behavior of XML write functions.

Exception Types

ExceptionFileMissing

A type of exception that is raised when a requested file cannot be opened.

ExceptionParseError

A type of exception that is raised when a requested document cannot be parsed.

Module Functions

flattenFilenames(doc, searchPath, customResolver)

getEnvironmentPath([sep])

getSourceSearchPath(arg0)

getSubdirectories(arg0, arg1, arg2)

loadDocuments(rootPath, searchPath, ...[, ...])

loadLibraries(libraryFolders, searchPath, doc)

loadLibrary(file, doc, searchPath, readOptions)

prependXInclude(arg0, arg1)

readFile(arg0)

readFromXmlFileBase(doc, filename, ...)

readFromXmlString(doc, str, searchPath, ...)

writeToXmlFile(doc, filename[, writeOptions])

writeToXmlString(doc[, writeOptions])

PyMaterialXFormat Module Function Documentation

flattenFilenames(doc: Document, searchPath: FileSearchPath = <FileSearchPath object at 0x107d034b0>, customResolver: StringResolver = None) None
getEnvironmentPath(sep: str = ':') FileSearchPath
getSourceSearchPath(arg0: Document) FileSearchPath
getSubdirectories(arg0: list[FilePath], arg1: FileSearchPath, arg2: list[FilePath]) None
loadDocuments(rootPath: FilePath, searchPath: FileSearchPath, skipFiles: set[str], includeFiles: set[str], documents: list[Document], documentsPaths: list[str], readOptions: XmlReadOptions = None, errors: list[str] = None) None
loadLibraries(libraryFolders: list[FilePath], searchPath: FileSearchPath, doc: Document, excludeFiles: set[str] = set(), readOptions: XmlReadOptions = None) set[str]
loadLibrary(file: FilePath, doc: Document, searchPath: FileSearchPath = <FileSearchPath object at 0x107d03230>, readOptions: XmlReadOptions = None) None
prependXInclude(arg0: Document, arg1: FilePath) None
readFile(arg0: FilePath) str
readFromXmlFileBase(doc: Document, filename: FilePath, searchPath: FileSearchPath = <FileSearchPath object at 0x107d17a70>, readOptions: XmlReadOptions = None) None
readFromXmlString(doc: Document, str: str, searchPath: FileSearchPath = <FileSearchPath object at 0x107d159b0>, readOptions: XmlReadOptions = None) None
writeToXmlFile(doc: Document, filename: FilePath, writeOptions: XmlWriteOptions = None) None
writeToXmlString(doc: Document, writeOptions: XmlWriteOptions = None) str

Module source: MaterialX / source / PyMaterialX / PyMaterialXFormat /