|
@@ -988,12 +988,10 @@ class CuraApplication(QtApplication):
|
|
|
op.addOperation(SetTransformOperation(node, Vector(0, center_y, 0), Quaternion(), Vector(1, 1, 1)))
|
|
|
op.push()
|
|
|
|
|
|
- ## Testing: arrange selected objects or all objects
|
|
|
+ ## Arrange all objects.
|
|
|
@pyqtSlot()
|
|
|
- def arrangeSelection(self):
|
|
|
- nodes = Selection.getAllSelectedObjects()
|
|
|
-
|
|
|
- # What nodes are on the build plate and are not being moved
|
|
|
+ def arrangeAll(self):
|
|
|
+ nodes = []
|
|
|
fixed_nodes = []
|
|
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
|
|
if type(node) is not SceneNode:
|
|
@@ -1004,12 +1002,15 @@ class CuraApplication(QtApplication):
|
|
|
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
|
|
if not node.isSelectable():
|
|
|
continue # i.e. node with layer data
|
|
|
- fixed_nodes.append(node)
|
|
|
+ nodes.append(node)
|
|
|
self.arrange(nodes, fixed_nodes)
|
|
|
|
|
|
+ ## Arrange Selection
|
|
|
@pyqtSlot()
|
|
|
- def arrangeAll(self):
|
|
|
- nodes = []
|
|
|
+ def arrangeSelection(self):
|
|
|
+ nodes = Selection.getAllSelectedObjects()
|
|
|
+
|
|
|
+ # What nodes are on the build plate and are not being moved
|
|
|
fixed_nodes = []
|
|
|
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
|
|
if type(node) is not SceneNode:
|
|
@@ -1020,7 +1021,7 @@ class CuraApplication(QtApplication):
|
|
|
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
|
|
if not node.isSelectable():
|
|
|
continue # i.e. node with layer data
|
|
|
- nodes.append(node)
|
|
|
+ fixed_nodes.append(node)
|
|
|
self.arrange(nodes, fixed_nodes)
|
|
|
|
|
|
## Arrange the nodes, given fixed nodes
|