Skip to content

Commit

Permalink
Merge pull request #983 from daizhirui/master
Browse files Browse the repository at this point in the history
Fix error: AttributeError: 'TextureVisuals' object has no attribute 'vertex_colors'
  • Loading branch information
marcomusy authored Nov 22, 2023
2 parents b27e279 + 13b2037 commit 09d711e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vedo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,8 @@ def trimesh2vedo(inputobj):
tact = vedo.Mesh(poly)
if inputobj.visual.kind == "face":
trim_c = inputobj.visual.face_colors
elif inputobj.visual.kind == "texture":
trim_c = inputobj.visual.to_color().vertex_colors
else:
trim_c = inputobj.visual.vertex_colors

Expand Down

0 comments on commit 09d711e

Please sign in to comment.