diff --git a/addons/io_scene_swbf_msh/msh_mesh_to_blend.py b/addons/io_scene_swbf_msh/msh_mesh_to_blend.py index fefd371..8f04253 100644 --- a/addons/io_scene_swbf_msh/msh_mesh_to_blend.py +++ b/addons/io_scene_swbf_msh/msh_mesh_to_blend.py @@ -85,9 +85,11 @@ def model_to_mesh_object(model: Model, scene : Scene, materials_map : Dict[str, if segment.triangles: segment_polygons = [tuple([ind + polygon_index_offset for ind in tri]) for tri in segment.triangles] elif segment.triangle_strips: + winding = [0,1,2] + rwinding = [1,0,2] for strip in segment.triangle_strips: for i in range(len(strip) - 2): - strip_tri = tuple([polygon_index_offset + strip[j] for j in range(i,i+3)]) + strip_tri = tuple([polygon_index_offset + strip[i+j] for j in (winding if i % 2 == 0 else rwinding)]) segment_polygons.append(strip_tri) elif segment.polygons: segment_polygons = [tuple([ind + polygon_index_offset for ind in polygon]) for polygon in segment.polygons] diff --git a/addons/io_scene_swbf_msh/msh_to_blend.py b/addons/io_scene_swbf_msh/msh_to_blend.py index dbb6190..c2e7b19 100644 --- a/addons/io_scene_swbf_msh/msh_to_blend.py +++ b/addons/io_scene_swbf_msh/msh_to_blend.py @@ -122,7 +122,7 @@ def extract_models(scene: Scene, materials_map : Dict[str, bpy.types.Material]) new_obj = None - if model.model_type == ModelType.STATIC or model.model_type == ModelType.SKIN or model.model_type == ModelType.SHADOWVOLUME: + if model.geometry: new_obj = model_to_mesh_object(model, scene, materials_map)