Rotate vertex indeces and UVs counter-clockwise

master
Senpai 5 days ago
parent ffa082b743
commit 745aed371d

@ -41,7 +41,7 @@ def convert_model(geo_model, mesh_data, obj, scale):
#Convert the geo_model into a GeoMesh. #Convert the geo_model into a GeoMesh.
geomesh = geo_model.saveToGeoMesh() geomesh = geo_model.saveToGeoMesh()
indices = [i for face in geomesh.face for i in face.vert_indexes] indices = [i for face in geomesh.face for i in (face.vert_indexes[0], face.vert_indexes[2], face.vert_indexes[1])]
texture_indices = [face.texture_index for face in geomesh.face] texture_indices = [face.texture_index for face in geomesh.face]
#Create materials for textures. #Create materials for textures.
@ -89,7 +89,7 @@ def convert_model(geo_model, mesh_data, obj, scale):
#???mesh_data.validate(False) #???mesh_data.validate(False)
d = mesh_data.uv_layers.new().data d = mesh_data.uv_layers.new().data
uvs = [c for f in geomesh.face for i in f.vert_indexes for c in geomesh.geovertex[i].uv] uvs = [c for f in geomesh.face for i in (f.vert_indexes[0], f.vert_indexes[2], f.vert_indexes[1]) for c in geomesh.geovertex[i].uv]
d.foreach_set('uv', uvs) d.foreach_set('uv', uvs)

Loading…
Cancel
Save