From 603df28c2adea8a47b470adf780419ecba57aff4 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 28 Apr 2025 13:36:54 +0200 Subject: [PATCH] Fix all exporters being broken CURA-12099 --- plugins/GCodeGzWriter/GCodeGzWriter.py | 2 +- plugins/GCodeWriter/GCodeWriter.py | 2 +- plugins/MakerbotWriter/MakerbotWriter.py | 2 +- plugins/UFPWriter/UFPWriter.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/GCodeGzWriter/GCodeGzWriter.py b/plugins/GCodeGzWriter/GCodeGzWriter.py index 2bbaaeb0a3..cb5b66fbdc 100644 --- a/plugins/GCodeGzWriter/GCodeGzWriter.py +++ b/plugins/GCodeGzWriter/GCodeGzWriter.py @@ -24,7 +24,7 @@ class GCodeGzWriter(MeshWriter): def __init__(self) -> None: 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. Note that even though the function accepts a collection of nodes, the diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index 9fa4f88614..0eac653b56 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -56,7 +56,7 @@ class GCodeWriter(MeshWriter): 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. Note that even though the function accepts a collection of nodes, the diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index f35b53a84d..e4dae9376b 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -91,7 +91,7 @@ class MakerbotWriter(MeshWriter): 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) if mode != MeshWriter.OutputMode.BinaryMode: Logger.log("e", "MakerbotWriter does not support text mode.") diff --git a/plugins/UFPWriter/UFPWriter.py b/plugins/UFPWriter/UFPWriter.py index 0cf756b6a4..c5558c1140 100644 --- a/plugins/UFPWriter/UFPWriter.py +++ b/plugins/UFPWriter/UFPWriter.py @@ -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 # by the Job class. @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.openStream(stream, "application/x-ufp", OpenMode.WriteOnly)