diff --git a/import_geo.py b/import_geo.py index eb10b87..683a651 100644 --- a/import_geo.py +++ b/import_geo.py @@ -158,6 +158,14 @@ def load(operator, context, scale = 1.0, filepath = "", global_matrix = None, us bpy.context.collection.objects.link(obj) bpy.context.view_layer.objects.active = obj + # Remove duplicate vertices + pop_mode = obj.mode + bpy.ops.object.mode_set(mode='EDIT') + bpy.ops.mesh.select_all(action='SELECT') + bpy.ops.mesh.remove_doubles(threshold=0.0) + bpy.ops.mesh.select_all(action='DESELECT') + bpy.ops.object.mode_set(mode=pop_mode) + #Try and attach it to the armature. if armature != None: bone_name = geo_model.getBoneRoot()