Seams are fixed

This commit is contained in:
2026-05-25 05:07:23 +03:00
parent 1a0fb87b93
commit 86310e96f2
+14
View File
@@ -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)