From 86310e96f21e68cfc5b3baf81eecaa56d2c9ce36 Mon Sep 17 00:00:00 2001 From: Sergey Lapin Date: Mon, 25 May 2026 05:07:23 +0300 Subject: [PATCH] Seams are fixed --- assets/blender/characters/consolidate.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/assets/blender/characters/consolidate.py b/assets/blender/characters/consolidate.py index c316714..b6e64fd 100644 --- a/assets/blender/characters/consolidate.py +++ b/assets/blender/characters/consolidate.py @@ -2,6 +2,12 @@ import bpy import sys import os +# Import seam/normal fix functions from transfer_shape_keys.py +_script_dir = os.path.dirname(os.path.abspath(__file__)) +if _script_dir not in sys.path: + sys.path.insert(0, _script_dir) +from transfer_shape_keys import fix_seams_across_objects, fix_normals_across_objects + def process_append(source_files, output_path): required_props = {"age", "sex", "slot"} @@ -65,6 +71,14 @@ def process_append(source_files, output_path): # 4. Recursive Purge of all unlinked data (Materials, Textures, Meshes) bpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True) + # 5. Fix seams across ALL body parts in the consolidated scene. + # This synchronizes shape key offsets and normals for matching vertices + # across base body parts and combined clothing variants. + print("\nFixing seams across all consolidated body parts...") + fix_seams_across_objects() + fix_normals_across_objects() + print("Consolidated seam/normal fix complete.\n") + # Save bpy.ops.wm.save_as_mainfile(filepath=output_path)