Browse Source

CURA-4931 Avoid creating a snapshot when there is no model in the buildplate. Since the writeStarted signal is catched by all the Writers, the createSnapshot method is triggered, but there is no scenenode in the buildplate to take a picture of, so the process is skipped

Diego Prado Gesto 7 years ago
parent
commit
487608574a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cura/Snapshot.py

+ 2 - 1
cura/Snapshot.py

@@ -57,8 +57,9 @@ class Snapshot:
                 else:
                     bbox = bbox + node.getBoundingBox()
 
+        # If there is no bounding box, it means that there is no model in the buildplate
         if bbox is None:
-            bbox = AxisAlignedBox()
+            return None
 
         look_at = bbox.center
         # guessed size so the objects are hopefully big