mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Remove deprecated functions
This commit is contained in:
parent
33c97fcf4a
commit
4ab79f963a
1 changed files with 0 additions and 82 deletions
|
@ -1106,88 +1106,6 @@ class CuraApplication(QtApplication):
|
||||||
self._platform_activity = True if count > 0 else False
|
self._platform_activity = True if count > 0 else False
|
||||||
self.activityChanged.emit()
|
self.activityChanged.emit()
|
||||||
|
|
||||||
# Remove all selected objects from the scene.
|
|
||||||
@pyqtSlot()
|
|
||||||
@deprecated("Moved to CuraActions", "2.6")
|
|
||||||
def deleteSelection(self):
|
|
||||||
if not self.getController().getToolsEnabled():
|
|
||||||
return
|
|
||||||
removed_group_nodes = []
|
|
||||||
op = GroupedOperation()
|
|
||||||
nodes = Selection.getAllSelectedObjects()
|
|
||||||
for node in nodes:
|
|
||||||
op.addOperation(RemoveSceneNodeOperation(node))
|
|
||||||
group_node = node.getParent()
|
|
||||||
if group_node and group_node.callDecoration("isGroup") and group_node not in removed_group_nodes:
|
|
||||||
remaining_nodes_in_group = list(set(group_node.getChildren()) - set(nodes))
|
|
||||||
if len(remaining_nodes_in_group) == 1:
|
|
||||||
removed_group_nodes.append(group_node)
|
|
||||||
op.addOperation(SetParentOperation(remaining_nodes_in_group[0], group_node.getParent()))
|
|
||||||
op.addOperation(RemoveSceneNodeOperation(group_node))
|
|
||||||
op.push()
|
|
||||||
|
|
||||||
## Remove an object from the scene.
|
|
||||||
# Note that this only removes an object if it is selected.
|
|
||||||
@pyqtSlot("quint64")
|
|
||||||
@deprecated("Use deleteSelection instead", "2.6")
|
|
||||||
def deleteObject(self, object_id):
|
|
||||||
if not self.getController().getToolsEnabled():
|
|
||||||
return
|
|
||||||
|
|
||||||
node = self.getController().getScene().findObject(object_id)
|
|
||||||
|
|
||||||
if not node and object_id != 0: # Workaround for tool handles overlapping the selected object
|
|
||||||
node = Selection.getSelectedObject(0)
|
|
||||||
|
|
||||||
if node:
|
|
||||||
op = GroupedOperation()
|
|
||||||
op.addOperation(RemoveSceneNodeOperation(node))
|
|
||||||
|
|
||||||
group_node = node.getParent()
|
|
||||||
if group_node:
|
|
||||||
# Note that at this point the node has not yet been deleted
|
|
||||||
if len(group_node.getChildren()) <= 2 and group_node.callDecoration("isGroup"):
|
|
||||||
op.addOperation(SetParentOperation(group_node.getChildren()[0], group_node.getParent()))
|
|
||||||
op.addOperation(RemoveSceneNodeOperation(group_node))
|
|
||||||
|
|
||||||
op.push()
|
|
||||||
|
|
||||||
## Create a number of copies of existing object.
|
|
||||||
# \param object_id
|
|
||||||
# \param count number of copies
|
|
||||||
# \param min_offset minimum offset to other objects.
|
|
||||||
@pyqtSlot("quint64", int)
|
|
||||||
@deprecated("Use CuraActions::multiplySelection", "2.6")
|
|
||||||
def multiplyObject(self, object_id, count, min_offset = 8):
|
|
||||||
node = self.getController().getScene().findObject(object_id)
|
|
||||||
if not node:
|
|
||||||
node = Selection.getSelectedObject(0)
|
|
||||||
|
|
||||||
while node.getParent() and node.getParent().callDecoration("isGroup"):
|
|
||||||
node = node.getParent()
|
|
||||||
|
|
||||||
job = MultiplyObjectsJob([node], count, min_offset)
|
|
||||||
job.start()
|
|
||||||
return
|
|
||||||
|
|
||||||
## Center object on platform.
|
|
||||||
@pyqtSlot("quint64")
|
|
||||||
@deprecated("Use CuraActions::centerSelection", "2.6")
|
|
||||||
def centerObject(self, object_id):
|
|
||||||
node = self.getController().getScene().findObject(object_id)
|
|
||||||
if not node and object_id != 0: # Workaround for tool handles overlapping the selected object
|
|
||||||
node = Selection.getSelectedObject(0)
|
|
||||||
|
|
||||||
if not node:
|
|
||||||
return
|
|
||||||
|
|
||||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
|
||||||
node = node.getParent()
|
|
||||||
|
|
||||||
if node:
|
|
||||||
op = SetTransformOperation(node, Vector())
|
|
||||||
op.push()
|
|
||||||
|
|
||||||
## Select all nodes containing mesh data in the scene.
|
## Select all nodes containing mesh data in the scene.
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def selectAll(self):
|
def selectAll(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue