mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:39:03 +08:00
Fix all exporters being broken
CURA-12099
This commit is contained in:
parent
371f280ab8
commit
603df28c2a
@ -24,7 +24,7 @@ class GCodeGzWriter(MeshWriter):
|
|||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
super().__init__(add_to_recent_files = False)
|
super().__init__(add_to_recent_files = False)
|
||||||
|
|
||||||
def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode = MeshWriter.OutputMode.BinaryMode) -> bool:
|
def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode = MeshWriter.OutputMode.BinaryMode, **kwargs) -> bool:
|
||||||
"""Writes the gzipped g-code to a stream.
|
"""Writes the gzipped g-code to a stream.
|
||||||
|
|
||||||
Note that even though the function accepts a collection of nodes, the
|
Note that even though the function accepts a collection of nodes, the
|
||||||
|
@ -56,7 +56,7 @@ class GCodeWriter(MeshWriter):
|
|||||||
|
|
||||||
self._application = Application.getInstance()
|
self._application = Application.getInstance()
|
||||||
|
|
||||||
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode):
|
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode, **kwargs):
|
||||||
"""Writes the g-code for the entire scene to a stream.
|
"""Writes the g-code for the entire scene to a stream.
|
||||||
|
|
||||||
Note that even though the function accepts a collection of nodes, the
|
Note that even though the function accepts a collection of nodes, the
|
||||||
|
@ -91,7 +91,7 @@ class MakerbotWriter(MeshWriter):
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter.OutputMode.BinaryMode) -> bool:
|
def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter.OutputMode.BinaryMode, **kwargs) -> bool:
|
||||||
metadata, file_format = self._getMeta(nodes)
|
metadata, file_format = self._getMeta(nodes)
|
||||||
if mode != MeshWriter.OutputMode.BinaryMode:
|
if mode != MeshWriter.OutputMode.BinaryMode:
|
||||||
Logger.log("e", "MakerbotWriter does not support text mode.")
|
Logger.log("e", "MakerbotWriter does not support text mode.")
|
||||||
|
@ -51,7 +51,7 @@ class UFPWriter(MeshWriter):
|
|||||||
# Qt thread. The File read/write operations right now are executed on separated threads because they are scheduled
|
# Qt thread. The File read/write operations right now are executed on separated threads because they are scheduled
|
||||||
# by the Job class.
|
# by the Job class.
|
||||||
@call_on_qt_thread
|
@call_on_qt_thread
|
||||||
def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode):
|
def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode, **kwargs):
|
||||||
archive = VirtualFile()
|
archive = VirtualFile()
|
||||||
archive.openStream(stream, "application/x-ufp", OpenMode.WriteOnly)
|
archive.openStream(stream, "application/x-ufp", OpenMode.WriteOnly)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user