Icons: avoid error with colors out of 0-255 range
This commit is contained in:
parent
dbcc96334a
commit
6e7da7616b
@ -162,7 +162,7 @@ def mesh_data_lists_from_mesh(me, material_colors):
|
||||
),
|
||||
# RGBA color.
|
||||
tuple((
|
||||
[int(c * b * 255) for c, b in zip(cn.color, base_color)]
|
||||
[min(max(int(c * b * 255), 0), 255) for c, b in zip(cn.color, base_color)]
|
||||
for cn in (c0, c1, c2)
|
||||
)),
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user