mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 23:29:07 +08:00
CURA-4525 fix placement on load to only avoid objects on current build plate
This commit is contained in:
parent
d91a2e1ca3
commit
b9a99d4692
@ -73,7 +73,7 @@ class CuraActions(QObject):
|
||||
# \param count The number of times to multiply the selection.
|
||||
@pyqtSlot(int)
|
||||
def multiplySelection(self, count: int) -> None:
|
||||
job = MultiplyObjectsJob(Selection.getAllSelectedObjects(), count, 8)
|
||||
job = MultiplyObjectsJob(Selection.getAllSelectedObjects(), count, min_offset = 8)
|
||||
job.start()
|
||||
|
||||
## Delete all selected objects.
|
||||
|
@ -1421,16 +1421,20 @@ class CuraApplication(QtApplication):
|
||||
filename = job.getFileName()
|
||||
self._currently_loading_files.remove(filename)
|
||||
|
||||
root = self.getController().getScene().getRoot()
|
||||
arranger = Arrange.create(scene_root = root)
|
||||
min_offset = 8
|
||||
|
||||
self.fileLoaded.emit(filename)
|
||||
arrange_objects_on_load = (
|
||||
not Preferences.getInstance().getValue("cura/use_multi_build_plate") or
|
||||
not Preferences.getInstance().getValue("cura/not_arrange_objects_on_load"))
|
||||
target_build_plate = self.getBuildPlateModel().activeBuildPlate if arrange_objects_on_load else -1
|
||||
|
||||
root = self.getController().getScene().getRoot()
|
||||
fixed_nodes = []
|
||||
for node_ in DepthFirstIterator(root):
|
||||
if node_.callDecoration("isSliceable") and node_.callDecoration("getBuildPlateNumber") == target_build_plate:
|
||||
fixed_nodes.append(node_)
|
||||
arranger = Arrange.create(fixed_nodes = fixed_nodes)
|
||||
min_offset = 8
|
||||
|
||||
for original_node in nodes:
|
||||
|
||||
# Create a CuraSceneNode just if the original node is not that type
|
||||
|
Loading…
x
Reference in New Issue
Block a user