mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
CURA-5164 Make the mesh readers compliant with the new signature of the mesh reader. Also adapt the tests.
This commit is contained in:
parent
39768e29cc
commit
ddd7b056f3
10 changed files with 20 additions and 20 deletions
|
@ -12,11 +12,11 @@ from UM.PluginRegistry import PluginRegistry
|
|||
# If you're zipping g-code, you might as well use gzip!
|
||||
class GCodeGzReader(MeshReader):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, application):
|
||||
super().__init__(application)
|
||||
self._supported_extensions = [".gcode.gz"]
|
||||
|
||||
def read(self, file_name):
|
||||
def _read(self, file_name):
|
||||
with open(file_name, "rb") as file:
|
||||
file_data = file.read()
|
||||
uncompressed_gcode = gzip.decompress(file_data).decode("utf-8")
|
||||
|
|
|
@ -21,4 +21,4 @@ def getMetaData():
|
|||
|
||||
def register(app):
|
||||
app.addNonSliceableExtension(".gz")
|
||||
return { "mesh_reader": GCodeGzReader.GCodeGzReader() }
|
||||
return { "mesh_reader": GCodeGzReader.GCodeGzReader(app) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue