mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Fix merge conflicts with master
This commit is contained in:
commit
d19b2fb8d9
22 changed files with 135 additions and 108 deletions
|
@ -648,7 +648,7 @@ class CuraApplication(QtApplication):
|
|||
if parsed_args["help"]:
|
||||
parser.print_help()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def run(self):
|
||||
self.preRun()
|
||||
|
||||
|
@ -824,6 +824,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
qmlRegisterSingletonType(ObjectsModel, "Cura", 1, 2, "ObjectsModel", self.getObjectsModel)
|
||||
qmlRegisterSingletonType(BuildPlateModel, "Cura", 1, 2, "BuildPlateModel", self.getBuildPlateModel)
|
||||
qmlRegisterType(InstanceContainer, "Cura", 1, 0, "InstanceContainer")
|
||||
qmlRegisterType(ExtrudersModel, "Cura", 1, 0, "ExtrudersModel")
|
||||
qmlRegisterType(ContainerSettingsModel, "Cura", 1, 0, "ContainerSettingsModel")
|
||||
qmlRegisterSingletonType(ProfilesModel, "Cura", 1, 0, "ProfilesModel", ProfilesModel.createProfilesModel)
|
||||
|
@ -921,6 +922,7 @@ class CuraApplication(QtApplication):
|
|||
not issubclass(type(node), CuraSceneNode) or
|
||||
(not node.getMeshData() and not node.callDecoration("getLayerData")) or
|
||||
(node.callDecoration("getBuildPlateNumber") != active_build_plate)):
|
||||
|
||||
continue
|
||||
if node.callDecoration("isBlockSlicing"):
|
||||
is_block_slicing_node = True
|
||||
|
@ -1037,7 +1039,7 @@ class CuraApplication(QtApplication):
|
|||
|
||||
Selection.clear()
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1059,10 +1061,12 @@ class CuraApplication(QtApplication):
|
|||
|
||||
nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if type(node) not in {SceneNode, CuraSceneNode}:
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
if not node.isSelectable():
|
||||
continue # Only remove nodes that are selectable.
|
||||
if node.getParent() and node.getParent().callDecoration("isGroup"):
|
||||
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
|
||||
nodes.append(node)
|
||||
|
@ -1075,7 +1079,11 @@ class CuraApplication(QtApplication):
|
|||
op.push()
|
||||
Selection.clear()
|
||||
|
||||
self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate
|
||||
Logger.log("i", "Reseting print information")
|
||||
self._print_information = PrintInformation.PrintInformation()
|
||||
|
||||
# stay on the same build plate
|
||||
#self.getCuraSceneController().setActiveBuildPlate(0) # Select first build plate
|
||||
|
||||
## Reset all translation on nodes with mesh data.
|
||||
@pyqtSlot()
|
||||
|
@ -1083,7 +1091,7 @@ class CuraApplication(QtApplication):
|
|||
Logger.log("i", "Resetting all scene translations")
|
||||
nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1111,7 +1119,7 @@ class CuraApplication(QtApplication):
|
|||
Logger.log("i", "Resetting all scene transformations")
|
||||
nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1138,7 +1146,7 @@ class CuraApplication(QtApplication):
|
|||
def arrangeObjectsToAllBuildPlates(self):
|
||||
nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1159,7 +1167,7 @@ class CuraApplication(QtApplication):
|
|||
nodes = []
|
||||
active_build_plate = self.getBuildPlateModel().activeBuildPlate
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1183,7 +1191,7 @@ class CuraApplication(QtApplication):
|
|||
# What nodes are on the build plate and are not being moved
|
||||
fixed_nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode):
|
||||
if not isinstance(node, SceneNode):
|
||||
continue
|
||||
if not node.getMeshData() and not node.callDecoration("isGroup"):
|
||||
continue # Node that doesnt have a mesh and is not a group.
|
||||
|
@ -1211,7 +1219,7 @@ class CuraApplication(QtApplication):
|
|||
Logger.log("i", "Reloading all loaded mesh data.")
|
||||
nodes = []
|
||||
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
|
||||
if not issubclass(type(node), SceneNode) or not node.getMeshData():
|
||||
if not isinstance(node, SceneNode) or not node.getMeshData():
|
||||
continue
|
||||
|
||||
nodes.append(node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue