When multiplying a parented node, multiply the parent instead (like groups)

This commit is contained in:
fieldOfView 2018-03-23 16:35:36 +01:00 committed by Lipu Fei
parent ea6d4d96f9
commit a52eaa98f1

View File

@ -32,14 +32,19 @@ class MultiplyObjectsJob(Job):
root = scene.getRoot()
arranger = Arrange.create(scene_root=root)
processed_nodes = []
nodes = []
for node in self._objects:
# If object is part of a group, multiply group
current_node = node
while current_node.getParent() and current_node.getParent().callDecoration("isGroup"):
while current_node.getParent() and (current_node.getParent().callDecoration("isGroup") or current_node.getParent().callDecoration("isSliceable")):
current_node = current_node.getParent()
if current_node in processed_nodes:
continue
processed_nodes.append(current_node)
node_too_big = False
if node.getBoundingBox().width < 300 or node.getBoundingBox().depth < 300:
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(current_node, min_offset=self._min_offset)