mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Fix model importing with multi build plate
CURA-4782
This commit is contained in:
parent
78b42afbcb
commit
702d7dd3a8
1 changed files with 8 additions and 1 deletions
|
@ -1479,7 +1479,14 @@ class CuraApplication(QtApplication):
|
|||
# Step is for skipping tests to make it a lot faster. it also makes the outcome somewhat rougher
|
||||
node, _ = arranger.findNodePlacement(node, offset_shape_arr, hull_shape_arr, step = 10)
|
||||
|
||||
node.addDecorator(BuildPlateDecorator(target_build_plate))
|
||||
# This node is deepcopied from some other node which already has a BuildPlateDecorator, but the deepcopy
|
||||
# of BuildPlateDecorator produces one that's assoicated with build plate -1. So, here we need to check if
|
||||
# the BuildPlateDecorator exists or not and always set the correct build plate number.
|
||||
build_plate_decorator = node.getDecorator(BuildPlateDecorator)
|
||||
if build_plate_decorator is None:
|
||||
build_plate_decorator = BuildPlateDecorator(target_build_plate)
|
||||
node.addDecorator(build_plate_decorator)
|
||||
build_plate_decorator.setBuildPlateNumber(target_build_plate)
|
||||
|
||||
op = AddSceneNodeOperation(node, scene.getRoot())
|
||||
op.push()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue