Skip to content

Commit 975dc97

Browse files
committed
Merge branch 'main' of https://github.com/compas-dev/compas
2 parents 44b22e8 + 9b617a1 commit 975dc97

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414

1515
### Changed
1616

17+
* Fixed args for `SceneObject` on Grasshopper `Draw` component.
18+
* Replaced use of `Rhino.Geometry.VertexColors.SetColors` with a for loop and `SetColor` in `compas_ghpyton` since the former requires a `System.Array`.
19+
1720
### Removed
1821

1922

@@ -32,7 +35,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3235

3336
### Removed
3437

35-
3638
## [2.4.0] 2024-08-22
3739

3840
### Added

src/compas_ghpython/components/Compas_ToRhinoGeometry/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ def RunScript(self, cg):
1212
if not cg:
1313
return None
1414

15-
return SceneObject(cg).draw()
15+
return SceneObject(item=cg).draw()

src/compas_ghpython/drawing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,10 @@ def draw_mesh(vertices, faces, color=None, vertex_normals=None, texture_coordina
373373

374374
if color:
375375
count = len(mesh.Vertices)
376-
colors = [rs.coercecolor(color) for i in range(count)]
377-
mesh.VertexColors.SetColors(colors)
376+
color = rs.CreateColor(color)
377+
378+
for i in range(count):
379+
mesh.VertexColors.SetColor(i, color.R, color.G, color.B)
378380

379381
return mesh
380382

0 commit comments

Comments
 (0)