diff options
-rw-r--r-- | cura/ConvexHullNode.py | 3 | ||||
-rw-r--r-- | plugins/LayerView/LayerView.py | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index a94ae60897..5be5820982 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -48,6 +48,9 @@ class ConvexHullNode(SceneNode): self.setMeshData(mesh) + def getWatchedNode(self): + return self._node + def render(self, renderer): if not self._material: self._material = renderer.createMaterial(Resources.getPath(Resources.ShadersLocation, "basic.vert"), Resources.getPath(Resources.ShadersLocation, "color.frag")) diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 7f8c04986d..e32645d9ed 100644 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -11,6 +11,9 @@ from . import LayerViewProxy from UM.Scene.Selection import Selection from UM.Math.Color import Color +from cura.ConvexHullNode import ConvexHullNode + + ## View used to display g-code paths. class LayerView(View): def __init__(self): @@ -45,6 +48,11 @@ class LayerView(View): self._selection_material.setUniformValue("u_color", Color(35, 35, 35, 128)) for node in DepthFirstIterator(scene.getRoot()): + # We do not want to render ConvexHullNode as it conflicts with the bottom layers. + # However, it is somewhat relevant when the node is selected, so do render it then. + if type(node) is ConvexHullNode and not Selection.isSelected(node.getWatchedNode()): + continue + if not node.render(renderer): if node.getMeshData() and node.isVisible(): if Selection.isSelected(node): |