Flip normals on import instead of export

master
pgsocks 4 months ago
parent 1cae33d1b5
commit e4556e5f0e

@ -160,8 +160,6 @@ def save(operator, context, scale = 1.0, filepath = "", global_matrix = None, us
else: else:
mesh.transform(global_matrix @ scale_matrix @ translate_matrix @ axis_rotation) mesh.transform(global_matrix @ scale_matrix @ translate_matrix @ axis_rotation)
mesh.flip_normals()
geo_model = geo.addModel(ob.name) geo_model = geo.addModel(ob.name)
convert_mesh(geo_model, mesh, ob) convert_mesh(geo_model, mesh, ob)

@ -98,6 +98,7 @@ def convert_model(geo_model, mesh_data, obj, scale):
mesh_data.update() mesh_data.update()
mesh_data.vertices.foreach_set("normal", normals) mesh_data.vertices.foreach_set("normal", normals)
mesh_data.update() mesh_data.update()
mesh_data.flip_normals()
#todo: attempt to load textures/images #todo: attempt to load textures/images

Loading…
Cancel
Save