From fb3011751315cf47bf4cce4d26e60206da9dbfe0 Mon Sep 17 00:00:00 2001 From: Zac Zhang Date: Fri, 12 Jan 2024 17:29:19 +0100 Subject: [PATCH] update for the review --- CHANGELOG.md | 2 +- src/compas_view2/objects/meshobject.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 856e161de..fa6eec16b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed - +* Fixed bug [#212](https://github.com/compas-dev/compas_view2/issues/212). ### Removed diff --git a/src/compas_view2/objects/meshobject.py b/src/compas_view2/objects/meshobject.py index f46aaf93e..dee45f29e 100644 --- a/src/compas_view2/objects/meshobject.py +++ b/src/compas_view2/objects/meshobject.py @@ -180,9 +180,9 @@ def _frontfaces_data(self): positions.append(b) positions.append(c) if self.use_vertex_color: - colors.append(vertex_color[a]) - colors.append(vertex_color[b]) - colors.append(vertex_color[c]) + colors.append(vertex_color[vertices[0]]) + colors.append(vertex_color[vertices[1]]) + colors.append(vertex_color[vertices[2]]) else: colors.append(color) colors.append(color) @@ -254,9 +254,9 @@ def _backfaces_data(self): positions.append(b) positions.append(c) if self.use_vertex_color: - colors.append(vertex_color[a]) - colors.append(vertex_color[b]) - colors.append(vertex_color[c]) + colors.append(vertex_color[vertices[0]]) + colors.append(vertex_color[vertices[1]]) + colors.append(vertex_color[vertices[2]]) else: colors.append(color) colors.append(color)