From 531f286445dbd204ff98311379c28e579bbde464 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 17 Oct 2024 11:22:55 +0200 Subject: [PATCH] Use same thumbnail formats for Sketch as Method CURA-12185 --- plugins/MakerbotWriter/MakerbotWriter.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/MakerbotWriter/MakerbotWriter.py b/plugins/MakerbotWriter/MakerbotWriter.py index 34ef562fd32..8b30362d78a 100644 --- a/plugins/MakerbotWriter/MakerbotWriter.py +++ b/plugins/MakerbotWriter/MakerbotWriter.py @@ -112,15 +112,13 @@ def write(self, stream: BufferedIOBase, nodes: List[SceneNode], mode=MeshWriter. match file_format: case "application/x-makerbot-sketch": filename, filedata = "print.gcode", gcode_text_io.getvalue() - self._PNG_FORMATS = self._PNG_FORMAT case "application/x-makerbot": filename, filedata = "print.jsontoolpath", du.gcode_2_miracle_jtp(gcode_text_io.getvalue()) - self._PNG_FORMATS = self._PNG_FORMAT + self._PNG_FORMAT_METHOD case _: raise Exception("Unsupported Mime type") png_files = [] - for png_format in self._PNG_FORMATS: + for png_format in (self._PNG_FORMAT + self._PNG_FORMAT_METHOD): width, height, prefix = png_format["width"], png_format["height"], png_format["prefix"] thumbnail_buffer = self._createThumbnail(width, height) if thumbnail_buffer is None: