mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Fix layerview for grouped objects
The "ghosts" would be rendered over grouped objects, thereby making them not visible. Note that this quick fix comes at the price of slightly "muddying" all the layerview colors. A better fix was proposed here (but it is not yet working correctly): https://github.com/Ultimaker/Cura/pull/906 CURA-2246
This commit is contained in:
parent
73d7e22efe
commit
aa689dc2fb
1 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ class LayerView(View):
|
|||
|
||||
if not self._ghost_shader:
|
||||
self._ghost_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "color.shader"))
|
||||
self._ghost_shader.setUniformValue("u_color", Color(0, 0, 0, 72))
|
||||
self._ghost_shader.setUniformValue("u_color", Color(0, 0, 0, 64))
|
||||
|
||||
for node in DepthFirstIterator(scene.getRoot()):
|
||||
# We do not want to render ConvexHullNode as it conflicts with the bottom layers.
|
||||
|
@ -98,10 +98,10 @@ class LayerView(View):
|
|||
if node.getMeshData() and node.isVisible():
|
||||
renderer.queueNode(node,
|
||||
shader = self._ghost_shader,
|
||||
state_setup_callback = lambda gl: gl.glDepthMask(gl.GL_FALSE),
|
||||
state_teardown_callback = lambda gl: gl.glDepthMask(gl.GL_TRUE)
|
||||
)
|
||||
type = RenderBatch.RenderType.Transparent )
|
||||
|
||||
for node in DepthFirstIterator(scene.getRoot()):
|
||||
if type(node) is SceneNode:
|
||||
if node.getMeshData() and node.isVisible():
|
||||
layer_data = node.callDecoration("getLayerData")
|
||||
if not layer_data:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue