mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
parent
f8d677eee8
commit
c21ad3df08
1 changed files with 6 additions and 5 deletions
|
@ -100,15 +100,16 @@ class LayerView(View):
|
||||||
continue
|
continue
|
||||||
except:
|
except:
|
||||||
continue
|
continue
|
||||||
|
if self._current_layer_mesh: #Threading thing; Switching between views can cause the current layer mesh to be deleted.
|
||||||
self._current_layer_mesh.addVertices(layer_mesh.getVertices())
|
self._current_layer_mesh.addVertices(layer_mesh.getVertices())
|
||||||
|
|
||||||
# Scale layer color by a brightness factor based on the current layer number
|
# Scale layer color by a brightness factor based on the current layer number
|
||||||
# This will result in a range of 0.5 - 1.0 to multiply colors by.
|
# This will result in a range of 0.5 - 1.0 to multiply colors by.
|
||||||
brightness = (2.0 - (i / self._solid_layers)) / 2.0
|
brightness = (2.0 - (i / self._solid_layers)) / 2.0
|
||||||
self._current_layer_mesh.addColors(layer_mesh.getColors() * brightness)
|
if self._current_layer_mesh:
|
||||||
|
self._current_layer_mesh.addColors(layer_mesh.getColors() * brightness)
|
||||||
renderer.queueNode(node, mesh = self._current_layer_mesh, material = self._material)
|
if self._current_layer_mesh:
|
||||||
|
renderer.queueNode(node, mesh = self._current_layer_mesh, material = self._material)
|
||||||
|
|
||||||
def setLayer(self, value):
|
def setLayer(self, value):
|
||||||
if self._current_layer_num != value:
|
if self._current_layer_num != value:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue