From 7a85430f70b0eb0312697fab6fb5960cf0238501 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 22 Sep 2016 14:25:00 +0200 Subject: [PATCH] Merging no longer crashes if node has no meshdata CURA-2443 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 09f04d9a2d..bb581a330b 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -816,7 +816,7 @@ class CuraApplication(QtApplication): return # Compute the center of the objects when their origins are aligned. - object_centers = [node.getMeshData().getCenterPosition().scale(node.getScale()) for node in group_node.getChildren()] + object_centers = [node.getMeshData().getCenterPosition().scale(node.getScale()) for node in group_node.getChildren() if node.getMeshData()] middle_x = sum([v.x for v in object_centers]) / len(object_centers) middle_y = sum([v.y for v in object_centers]) / len(object_centers) middle_z = sum([v.z for v in object_centers]) / len(object_centers)