From 9dc50ec73f12270a7629fcf0b548e93891bdf717 Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Tue, 20 Mar 2018 16:54:34 +0100 Subject: [PATCH] CURA-4400 Apply correct shader to grouped nodes --- cura/BuildVolume.py | 11 ++++++++++- plugins/CuraEngineBackend/StartSliceJob.py | 4 ---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index d93ce1107d..6da8f33fff 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -238,7 +238,16 @@ class BuildVolume(SceneNode): # Group nodes should override the _outside_buildarea property of their children. for group_node in group_nodes: - for child_node in group_node.getAllChildren(): + children = group_node.getAllChildren() + + # Check if one or more children are non-printable and if so, set the parent as non-printable: + for child_node in children: + if child_node.isOutsideBuildArea(): + group_node.setOutsideBuildArea(True) + break + + # Apply results of the check to all children of the group: + for child_node in children: child_node.setOutsideBuildArea(group_node.isOutsideBuildArea()) ## Update the outsideBuildArea of a single node, given bounds or current build volume diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 63e8034859..89f9a144b0 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -197,10 +197,6 @@ class StartSliceJob(Job): if getattr(node, "_outside_buildarea", False) and not is_non_printing_mesh: continue - #node_position = node.callDecoration("getActiveExtruderPosition") - #if not stack.extruders[str(node_position)].isEnabled: - # continue - temp_list.append(node) if not is_non_printing_mesh: has_printing_mesh = True