From e4556e5f0e687b13c11b197c192c2b1318bd3e7c Mon Sep 17 00:00:00 2001 From: pgsocks Date: Sun, 4 Aug 2024 22:03:00 +0000 Subject: [PATCH] Flip normals on import instead of export --- export_geo.py | 2 -- import_geo.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/export_geo.py b/export_geo.py index 20b3067..55b3e75 100644 --- a/export_geo.py +++ b/export_geo.py @@ -160,8 +160,6 @@ def save(operator, context, scale = 1.0, filepath = "", global_matrix = None, us else: mesh.transform(global_matrix @ scale_matrix @ translate_matrix @ axis_rotation) - mesh.flip_normals() - geo_model = geo.addModel(ob.name) convert_mesh(geo_model, mesh, ob) diff --git a/import_geo.py b/import_geo.py index 1b3983b..eb10b87 100644 --- a/import_geo.py +++ b/import_geo.py @@ -98,6 +98,7 @@ def convert_model(geo_model, mesh_data, obj, scale): mesh_data.update() mesh_data.vertices.foreach_set("normal", normals) mesh_data.update() + mesh_data.flip_normals() #todo: attempt to load textures/images