diff options
author | Jaime van Kessel <nallath@gmail.com> | 2022-04-13 17:47:07 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2022-04-13 17:47:07 +0300 |
commit | 204eeaf272b9a1d70e1031542cc417e94299df92 (patch) | |
tree | f17434adeec8a138daf606e283ac934195685679 /cura | |
parent | c9e625767b419b6f581a1ac9daf41ea7d17b5938 (diff) |
Add extra warnings if it failed to create snapshot
CURA-9120
Diffstat (limited to 'cura')
-rw-r--r-- | cura/Snapshot.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cura/Snapshot.py b/cura/Snapshot.py index 97306fb371..5bf6da3794 100644 --- a/cura/Snapshot.py +++ b/cura/Snapshot.py @@ -6,6 +6,7 @@ from PyQt6 import QtCore from PyQt6.QtCore import QCoreApplication from PyQt6.QtGui import QImage +from UM.Logger import Logger from cura.PreviewPass import PreviewPass from UM.Application import Application @@ -64,6 +65,7 @@ class Snapshot: bbox = bbox + node.getBoundingBox() # If there is no bounding box, it means that there is no model in the buildplate if bbox is None: + Logger.log("w", "Unable to create snapshot as we seem to have an empty buildplate") return None look_at = bbox.center @@ -96,6 +98,7 @@ class Snapshot: try: min_x, max_x, min_y, max_y = Snapshot.getImageBoundaries(pixel_output) except (ValueError, AttributeError): + Logger.log("w", "Failed to crop the snapshot!") return None size = max((max_x - min_x) / render_width, (max_y - min_y) / render_height) |