We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2155e8d commit d440b7dCopy full SHA for d440b7d
pywavefront/obj.py
@@ -396,8 +396,8 @@ def emit_vertex(vertex):
396
idx = v_index,
397
pos = self.wavefront.vertices[v_index][0:3] if has_colors else self.wavefront.vertices[v_index],
398
color = self.wavefront.vertices[v_index][3:] if has_colors else (),
399
- uv = self.tex_coords[t_index] if has_vt else (),
400
- normal = self.normals[n_index] if has_vn else ()
+ uv = self.tex_coords[t_index] if has_vt and t_index < len(self.tex_coords) else (),
+ normal = self.normals[n_index] if has_vn and n_index < len(self.normals) else ()
401
)
402
403
yield from emit_vertex(vcurrent)
0 commit comments