mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 07:45:11 +08:00
When multiplying a parented node, multiply the parent instead (like groups)
This commit is contained in:
parent
ea6d4d96f9
commit
a52eaa98f1
@ -32,14 +32,19 @@ class MultiplyObjectsJob(Job):
|
|||||||
|
|
||||||
root = scene.getRoot()
|
root = scene.getRoot()
|
||||||
arranger = Arrange.create(scene_root=root)
|
arranger = Arrange.create(scene_root=root)
|
||||||
|
processed_nodes = []
|
||||||
nodes = []
|
nodes = []
|
||||||
|
|
||||||
for node in self._objects:
|
for node in self._objects:
|
||||||
# If object is part of a group, multiply group
|
# If object is part of a group, multiply group
|
||||||
current_node = node
|
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()
|
current_node = current_node.getParent()
|
||||||
|
|
||||||
|
if current_node in processed_nodes:
|
||||||
|
continue
|
||||||
|
processed_nodes.append(current_node)
|
||||||
|
|
||||||
node_too_big = False
|
node_too_big = False
|
||||||
if node.getBoundingBox().width < 300 or node.getBoundingBox().depth < 300:
|
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)
|
offset_shape_arr, hull_shape_arr = ShapeArray.fromNode(current_node, min_offset=self._min_offset)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user