From 745aed371d85287628ad353e04cc4e2e389c6221 Mon Sep 17 00:00:00 2001 From: Senpai Date: Tue, 14 Jan 2025 00:49:00 -0600 Subject: [PATCH] Rotate vertex indeces and UVs counter-clockwise --- import_geo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/import_geo.py b/import_geo.py index 683a651..d5ff73f 100644 --- a/import_geo.py +++ b/import_geo.py @@ -41,7 +41,7 @@ def convert_model(geo_model, mesh_data, obj, scale): #Convert the geo_model into a GeoMesh. 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] #Create materials for textures. @@ -89,7 +89,7 @@ def convert_model(geo_model, mesh_data, obj, scale): #???mesh_data.validate(False) 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)