Central class for reading and writing meshes.
More...
|
| __init__ (self, str writer_type, str reader_type, parent=None) |
|
| setApplication (cls, application) |
|
| getApplication (cls) |
|
"FileHandler" | getInstance (cls, *args, **kwargs) |
| Return the singleton instance of the filehandler.
|
|
| supportedReadFileTypes (self) |
|
| supportedWriteFileTypes (self) |
|
| readLocalFile (self, file) |
|
| getSupportedFileTypesWrite (self) |
| Get list of all supported filetypes for writing.
|
|
| getSupportedFileTypesRead (self) |
|
| addReader (self, "MeshReader" reader) |
|
| addWriter (self, "MeshWriter" writer) |
|
| readerRead (self, reader, file_name, **kwargs) |
|
Optional["MeshWriter"] | getWriterByMimeType (self, mime) |
| Get a mesh writer object that supports writing the specified mime type.
|
|
Optional["MeshWriter"] | getWriter (self, writer_id) |
| Get an instance of a mesh writer by ID.
|
|
Optional["MeshReader"] | getReaderForFile (self, file_name) |
| Find a Reader that accepts the given file name.
|
|
|
| _readLocalFile (self, file) |
|
|
| _readers |
|
| _writers |
|
| _writer_type |
|
| _reader_type |
|
|
| _instance = None |
|
| _application = None |
|
Central class for reading and writing meshes.
This class is created by Application and handles reading and writing mesh files.
◆ getReaderForFile()
Optional["MeshReader"] UM.FileHandler.FileHandler.FileHandler.getReaderForFile |
( |
|
self, |
|
|
|
file_name |
|
) |
| |
Find a Reader that accepts the given file name.
- Parameters
-
file_name | The name of file to load. |
- Returns
- Reader that accepts the given file name. If no acceptable Reader is found None is returned.
◆ getSupportedFileTypesWrite()
UM.FileHandler.FileHandler.FileHandler.getSupportedFileTypesWrite |
( |
|
self | ) |
|
Get list of all supported filetypes for writing.
- Returns
- List of dicts containing id, extension, description and mime_type for all supported file types.
◆ getWriterByMimeType()
Optional["MeshWriter"] UM.FileHandler.FileHandler.FileHandler.getWriterByMimeType |
( |
|
self, |
|
|
|
mime |
|
) |
| |
Get a mesh writer object that supports writing the specified mime type.
- Parameters
-
mime | The mime type that should be supported. |
- Returns
- A MeshWriter instance or None if no mesh writer supports the specified mime type. If there are multiple writers that support the specified mime type, the first entry is returned.
The documentation for this class was generated from the following file:
- UM/FileHandler/FileHandler.py