Merging no longer crashes if node has no meshdata

CURA-2443
This commit is contained in:
Jaime van Kessel 2016-09-22 14:25:00 +02:00
parent 4792aadc3a
commit 7a85430f70

View file

@ -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)