diff --git a/plugins/UFPWriter/UFPWriter.py b/plugins/UFPWriter/UFPWriter.py index d318a0e77d..b3088fc863 100644 --- a/plugins/UFPWriter/UFPWriter.py +++ b/plugins/UFPWriter/UFPWriter.py @@ -27,14 +27,13 @@ class UFPWriter(MeshWriter): MimeTypeDatabase.addMimeType( MimeType( - name = "application/x-cura-stl-file", + name = "application/x-ufp", comment = "Cura UFP File", suffixes = ["ufp"] ) ) self._snapshot = None - Application.getInstance().getOutputDeviceManager().writeStarted.connect(self._createSnapshot) def _createSnapshot(self, *args): # must be called from the main thread because of OpenGL @@ -62,6 +61,8 @@ class UFPWriter(MeshWriter): gcode.write(gcode_textio.getvalue().encode("UTF-8")) archive.addRelation(virtual_path = "/3D/model.gcode", relation_type = "http://schemas.ultimaker.org/package/2018/relationships/gcode") + self._createSnapshot() + #Store the thumbnail. if self._snapshot: archive.addContentType(extension = "png", mime_type = "image/png")