Import_max: Avoid index error in texture map

Avoid index error in texture map
This commit is contained in:
Sebastian
2024-11-30 04:39:10 +01:00
committed by GitHub
parent e637266e30
commit cb531c280d

View File

@ -1515,7 +1515,7 @@ def create_shape(context, settings, node, mesh, mat):
if name is not None:
name = name.data
meshobject = draw_shape(name, mesh, mesh.faces)
if ('UV' in obtypes and mesh.maps):
if ('UV' in obtypes and len(mesh.maps) == len(mesh.cords)):
for idx, uvm in enumerate(mesh.maps):
select = idx if len(mesh.cords[idx]) <= len(mesh.verts) else 0
meshobject = draw_map(meshobject, mesh.cords[select], mesh.uvids[select])