Browse Source

CURA-4400 Apply correct shader to grouped nodes

Ian Paschal 7 years ago
parent
commit
9dc50ec73f
2 changed files with 10 additions and 5 deletions
  1. 10 1
      cura/BuildVolume.py
  2. 0 4
      plugins/CuraEngineBackend/StartSliceJob.py

+ 10 - 1
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

+ 0 - 4
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