From 3b0a9bf16c88d0f8ae9179d5cdbd855f7b64204d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Mar 2018 15:50:35 +0100 Subject: [PATCH] Fix checking whether to render objects in X-ray pass Otherwise nothing gets drawn there. Contributes to issue CURA-5040. --- plugins/XRayView/XRayPass.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/XRayView/XRayPass.py b/plugins/XRayView/XRayPass.py index 38c88a256e..a75d393b35 100644 --- a/plugins/XRayView/XRayPass.py +++ b/plugins/XRayView/XRayPass.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015 Ultimaker B.V. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os.path @@ -10,7 +10,7 @@ from UM.View.RenderPass import RenderPass from UM.View.RenderBatch import RenderBatch from UM.View.GL.OpenGL import OpenGL -from UM.Scene.SceneNode import SceneNode +from cura.Scene.CuraSceneNode import CuraSceneNode from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator class XRayPass(RenderPass): @@ -27,7 +27,7 @@ class XRayPass(RenderPass): batch = RenderBatch(self._shader, type = RenderBatch.RenderType.NoType, backface_cull = False, blend_mode = RenderBatch.BlendMode.Additive) for node in DepthFirstIterator(self._scene.getRoot()): - if type(node) is SceneNode and node.getMeshData() and node.isVisible(): + if isinstance(node, CuraSceneNode) and node.getMeshData() and node.isVisible(): batch.addItem(node.getWorldTransformation(), node.getMeshData()) self.bind()