mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 17:24:21 +08:00
Merge branch 'fix_xray_zfighting' of https://github.com/fieldOfView/Cura
This commit is contained in:
commit
f7b4bd50ae
@ -17,6 +17,7 @@ from UM.View.RenderBatch import RenderBatch
|
|||||||
from UM.View.GL.OpenGL import OpenGL
|
from UM.View.GL.OpenGL import OpenGL
|
||||||
|
|
||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
|
from cura.Scene.ConvexHullNode import ConvexHullNode
|
||||||
|
|
||||||
from . import XRayPass
|
from . import XRayPass
|
||||||
|
|
||||||
@ -41,6 +42,10 @@ class XRayView(View):
|
|||||||
self._xray_shader.setUniformValue("u_color", Color(*Application.getInstance().getTheme().getColor("xray").getRgb()))
|
self._xray_shader.setUniformValue("u_color", Color(*Application.getInstance().getTheme().getColor("xray").getRgb()))
|
||||||
|
|
||||||
for node in BreadthFirstIterator(scene.getRoot()):
|
for node in BreadthFirstIterator(scene.getRoot()):
|
||||||
|
# We do not want to render ConvexHullNode as it conflicts with the bottom of the X-Ray (z-fighting).
|
||||||
|
if type(node) is ConvexHullNode:
|
||||||
|
continue
|
||||||
|
|
||||||
if not node.render(renderer):
|
if not node.render(renderer):
|
||||||
if node.getMeshData() and node.isVisible():
|
if node.getMeshData() and node.isVisible():
|
||||||
renderer.queueNode(node,
|
renderer.queueNode(node,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user