mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Finishing up compatibility mode
This commit is contained in:
parent
93137fcc91
commit
f0e0d65635
5 changed files with 91 additions and 15 deletions
|
|
@ -49,7 +49,8 @@ class LayerDataBuilder(MeshBuilder):
|
|||
self._layers[layer].setThickness(thickness)
|
||||
|
||||
# material color map: [r, g, b, a] for each extruder row.
|
||||
def build(self, material_color_map):
|
||||
# line_type_brightness: compatibility layer view uses line type brightness of 0.5
|
||||
def build(self, material_color_map, line_type_brightness = 1.0):
|
||||
vertex_count = 0
|
||||
index_count = 0
|
||||
for layer, data in self._layers.items():
|
||||
|
|
@ -70,6 +71,7 @@ class LayerDataBuilder(MeshBuilder):
|
|||
self._element_counts[layer] = data.elementCount
|
||||
|
||||
self.addVertices(vertices)
|
||||
colors[:, 0:3] *= line_type_brightness
|
||||
self.addColors(colors)
|
||||
self.addIndices(indices.flatten())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue