From a73a114b89ae54c98c1fb071a43202d1f1093d53 Mon Sep 17 00:00:00 2001 From: pgsocks Date: Thu, 22 Aug 2024 04:00:49 +0000 Subject: [PATCH] Merge duplicate vertices --- import_geo.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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()