diff options
author | Jack Ha <j.ha@ultimaker.com> | 2016-12-28 17:20:14 +0300 |
---|---|---|
committer | Jack Ha <j.ha@ultimaker.com> | 2016-12-28 17:20:14 +0300 |
commit | 0f2fb86cd9872843eb73d86cbb5e001c75ad93dd (patch) | |
tree | 4fb2279582a61627559973d3414e43904e653dad /cura/LayerPolygon.py | |
parent | 8d2b3654a4ff8d107b97fb2297cc27bd05315ed5 (diff) |
Layer shader now uses own attribute for line dimensions instead of misusing uvs.
Diffstat (limited to 'cura/LayerPolygon.py')
-rw-r--r-- | cura/LayerPolygon.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 858fa11c77..439146e6e2 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -67,7 +67,7 @@ class LayerPolygon: ## build # line_thicknesses: array with type as index and thickness as value - def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, indices, thickness): + def build(self, vertex_offset, index_offset, vertices, colors, line_dimensions, indices): if (self._build_cache_line_mesh_mask is None) or (self._build_cache_needed_points is None ): self.buildCache() @@ -85,6 +85,7 @@ class LayerPolygon: # Points are picked based on the index list to get the vertices needed. vertices[self._vertex_begin:self._vertex_end, :] = self._data[index_list, :] + # Create an array with colors for each vertex and remove the color data for the points that has been thrown away. colors[self._vertex_begin:self._vertex_end, :] = numpy.tile(self._colors, (1, 2)).reshape((-1, 4))[needed_points_list.ravel()] colors[self._vertex_begin:self._vertex_end, :] *= numpy.array([[0.5, 0.5, 0.5, 1.0]], numpy.float32) |