Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2021-01-20 13:23:48 +0300
committerKostas Karmas <konskarm@gmail.com>2021-01-20 13:23:48 +0300
commita72a58cca194c605d8894ba7f04cebeb359da991 (patch)
treeeaddef37f40ad195fed07bd18600c4b88262f4cd /plugins
parentb7e613a271c6294c91c1bcb861487aeee878ad72 (diff)
Comment out the generation of the snapshot
While generating UFP files from outside the main thread, the snapshot generation crashes Cura due to the OpenGL context. To avoid that, for the time being, we comment out the generation of the snapshot. CURA-7865
Diffstat (limited to 'plugins')
-rw-r--r--plugins/UFPWriter/UFPWriter.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/UFPWriter/UFPWriter.py b/plugins/UFPWriter/UFPWriter.py
index 6179872b2d..08c2f3252f 100644
--- a/plugins/UFPWriter/UFPWriter.py
+++ b/plugins/UFPWriter/UFPWriter.py
@@ -72,24 +72,24 @@ 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")
- thumbnail = archive.getStream("/Metadata/thumbnail.png")
-
- thumbnail_buffer = QBuffer()
- thumbnail_buffer.open(QBuffer.ReadWrite)
- thumbnail_image = self._snapshot
- thumbnail_image.save(thumbnail_buffer, "PNG")
-
- thumbnail.write(thumbnail_buffer.data())
- archive.addRelation(virtual_path = "/Metadata/thumbnail.png",
- relation_type = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail",
- origin = "/3D/model.gcode")
- else:
- Logger.log("d", "Thumbnail not created, cannot save it")
+ # self._createSnapshot()
+ #
+ # # Store the thumbnail.
+ # if self._snapshot:
+ # archive.addContentType(extension = "png", mime_type = "image/png")
+ # thumbnail = archive.getStream("/Metadata/thumbnail.png")
+ #
+ # thumbnail_buffer = QBuffer()
+ # thumbnail_buffer.open(QBuffer.ReadWrite)
+ # thumbnail_image = self._snapshot
+ # thumbnail_image.save(thumbnail_buffer, "PNG")
+ #
+ # thumbnail.write(thumbnail_buffer.data())
+ # archive.addRelation(virtual_path = "/Metadata/thumbnail.png",
+ # relation_type = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail",
+ # origin = "/3D/model.gcode")
+ # else:
+ # Logger.log("d", "Thumbnail not created, cannot save it")
# Store the material.
application = CuraApplication.getInstance()