Uranium
Application Framework
UM.FileHandler.FileHandler.FileHandler Class Reference

Central class for reading and writing meshes. More...

Inheritance diagram for UM.FileHandler.FileHandler.FileHandler:
UM.Mesh.MeshFileHandler.MeshFileHandler UM.Workspace.WorkspaceFileHandler.WorkspaceFileHandler

Public Member Functions

def __init__
 
def setApplication
 
def getApplication (cls)
 
def getInstance
 Return the singleton instance of the file handler. More...
 
def supportedReadFileTypes (self)
 
def supportedWriteFileTypes (self)
 
def readLocalFile
 
def getSupportedFileTypesWrite (self)
 Get list of all supported filetypes for writing. More...
 
def getSupportedFileTypesRead (self)
 
def addReader
 
def addWriter
 
def readerRead
 
def getWriterByMimeType
 Get a mesh writer object that supports writing the specified mime type. More...
 
def getWriter
 Get an instance of a mesh writer by ID.
 
def getReaderForFile
 Find a Reader that accepts the given file name. More...
 

Static Public Attributes

 constant
 

Detailed Description

Central class for reading and writing meshes.

This class is created by Application and handles reading and writing mesh files.

Member Function Documentation

◆ getInstance()

def UM.FileHandler.FileHandler.FileHandler.getInstance (   cls,
  args 
)

Return the singleton instance of the file handler.

◆ getReaderForFile()

def UM.FileHandler.FileHandler.FileHandler.getReaderForFile (   self,
  file_name 
)

Find a Reader that accepts the given file name.

Parameters
file_nameThe name of file to load.
Returns
Reader that accepts the given file name. If no acceptable Reader is found None is returned.

◆ getSupportedFileTypesWrite()

def UM.FileHandler.FileHandler.FileHandler.getSupportedFileTypesWrite (   self,
  List,
  Dict,
  str,
  Union,
  str,
  int 
)

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()

def UM.FileHandler.FileHandler.FileHandler.getWriterByMimeType (   self,
  mime 
)

Get a mesh writer object that supports writing the specified mime type.

Parameters
mimeThe 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: