diff --git a/cura/BlockSlicingDecorator.py b/cura/BlockSlicingDecorator.py index 669d69b09f..3fc0015836 100644 --- a/cura/BlockSlicingDecorator.py +++ b/cura/BlockSlicingDecorator.py @@ -4,6 +4,6 @@ from UM.Scene.SceneNodeDecorator import SceneNodeDecorator class BlockSlicingDecorator(SceneNodeDecorator): def __init__(self): super().__init__() - + def isBlockSlicing(self): return True diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 54f4cf3057..73cf50b214 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -585,10 +585,13 @@ class CuraApplication(QtApplication): def updatePlatformActivity(self, node = None): count = 0 scene_bounding_box = None + is_block_slicing_node = False for node in DepthFirstIterator(self.getController().getScene().getRoot()): - if type(node) is not SceneNode or (not node.getMeshData() and not node.callDecoration("isBlockSlicing")): + if type(node) is not SceneNode or (not node.getMeshData() and not node.callDecoration("getLayerData")): continue - + if node.callDecoration("isBlockSlicing"): + is_block_slicing_node = True + count += 1 if not scene_bounding_box: scene_bounding_box = node.getBoundingBox() @@ -597,6 +600,10 @@ class CuraApplication(QtApplication): if other_bb is not None: scene_bounding_box = scene_bounding_box + node.getBoundingBox() + print_information = self.getPrintInformation() + if print_information: + print_information.setPreSliced(is_block_slicing_node) + if not scene_bounding_box: scene_bounding_box = AxisAlignedBox.Null @@ -717,7 +724,7 @@ class CuraApplication(QtApplication): for node in DepthFirstIterator(self.getController().getScene().getRoot()): if type(node) is not SceneNode: continue - if (not node.getMeshData() and not node.callDecoration("isBlockSlicing")) and not node.callDecoration("isGroup"): + 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 node.getParent() and node.getParent().callDecoration("isGroup"): continue # Grouped nodes don't need resetting as their parent (the group) is resetted) diff --git a/cura/GCodeListDecorator.py b/cura/GCodeListDecorator.py index 72ff975108..5738d0a7f2 100644 --- a/cura/GCodeListDecorator.py +++ b/cura/GCodeListDecorator.py @@ -5,7 +5,7 @@ class GCodeListDecorator(SceneNodeDecorator): def __init__(self): super().__init__() self._gcode_list = [] - + def getGCodeList(self): return self._gcode_list diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index 93e2bd7c68..cf53475fb4 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -315,8 +315,6 @@ class CuraEngineBackend(Backend): if source is self._scene.getRoot(): return - application = Application.getInstance() - should_pause = False for node in DepthFirstIterator(self._scene.getRoot()): if node.callDecoration("isBlockSlicing"): @@ -325,15 +323,10 @@ class CuraEngineBackend(Backend): if gcode_list is not None: self._scene.gcode_list = gcode_list - print_information = application.getPrintInformation() if should_pause: self.pauseSlicing() - if print_information: - print_information.setPreSliced(True) else: self.continueSlicing() - if print_information: - print_information.setPreSliced(False) if source.getMeshData() is None: return