diff --git a/CHANGELOG.md b/CHANGELOG.md index 88a4ecdfeb2..8138c09e751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +* Replaced use of `Rhino.Geometry.VertexColors.SetColors` with a for loop and `SetColor` in `compas_ghpyton` since the former requires a `System.Array`. * Changed the `__str__` of `compas.geometry.Frame`, `compas.geometry.Plane`, `compas.geometry.Polygon`, `compas.geometry.Polyhedron`, `compas.geometry.Quaternion` to use a limited number of decimals (determined by `Tolerance.PRECISION`). Note: `__repr__` will instead maintain full precision. * Changed the `__str__` of `compas.geometry.Pointcloud` to print total number of points instead of the long list of points. Note: `__repr__` will still print all the points with full precision. * Fixed bug in `Pointcloud.from_box()`. diff --git a/src/compas_ghpython/drawing.py b/src/compas_ghpython/drawing.py index 001fa4e3346..5bf971a251f 100644 --- a/src/compas_ghpython/drawing.py +++ b/src/compas_ghpython/drawing.py @@ -373,8 +373,10 @@ def draw_mesh(vertices, faces, color=None, vertex_normals=None, texture_coordina if color: count = len(mesh.Vertices) - colors = [rs.coercecolor(color) for i in range(count)] - mesh.VertexColors.SetColors(colors) + color = rs.CreateColor(color) + + for i in range(count): + mesh.VertexColors.SetColor(i, color.R, color.G, color.B) return mesh