Fix convert-mesh script

This commit is contained in:
Nikita Lisitsa 2022-10-01 13:52:56 +03:00
parent 968d79df7b
commit ef3359add1

View file

@ -62,11 +62,11 @@ smooth_index = {}
def append_vertex(v, n): def append_vertex(v, n):
vertex_coords.append((v.co.x, v.co.y, v.co.z)) vertex_coords.append((v.co.x, v.co.y, v.co.z))
vertex_normals.append((n.x, n.y, n.z)) vertex_normals.append((n.x, n.y, n.z))
if colors: if colors is not None:
vertex_colors.append(tuple(colors[li].color)) vertex_colors.append(tuple(colors[li].color))
if texcoords: if texcoords is not None:
vertex_texcoords.append((texcoords[li].uv[0], 1.0 - texcoords[li].uv[1])) vertex_texcoords.append((texcoords[li].uv[0], 1.0 - texcoords[li].uv[1]))
if armature: if armature is not None:
weights = [] weights = []
for g in v.groups: for g in v.groups:
name = obj.vertex_groups[g.group].name name = obj.vertex_groups[g.group].name