Skip to content

Commit edf86df

Browse files
committed
more small fixes
1 parent 1085c6d commit edf86df

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/compas_blender/artists/polygonartist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def __init__(self,
3131

3232
def draw(self,
3333
color: Optional[RGBColor] = None,
34-
show_points=False,
35-
show_edges=False,
36-
show_face=True) -> List[bpy.types.Object]:
34+
show_points: bool = False,
35+
show_edges: bool = False,
36+
show_face: bool = True) -> List[bpy.types.Object]:
3737
"""Draw the polygon.
3838
3939
Parameters

src/compas_blender/artists/robotmodelartist.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ def create_geometry(self,
4545
color = geometry.attributes['mesh_color.diffuse']
4646

4747
# If we have a color, we'll discard alpha because draw_mesh is hard coded for a=1
48-
if color and len(color) == 4:
49-
r, g, b, _a = color
50-
color = (r, g, b)
51-
if not color:
48+
if color:
49+
color = color[:3]
50+
else:
5251
color = (1., 1., 1.)
5352

5453
v, f = geometry.to_vertices_and_faces()

0 commit comments

Comments
 (0)