add manual meshes to migbbody shapekeys

This commit is contained in:
Nathan
2026-03-25 14:48:59 -06:00
parent 7c1969de20
commit b59695f99e
6 changed files with 955 additions and 110 deletions
+10 -1
View File
@@ -399,7 +399,16 @@ class DLM_OT_migrator_basebody_shapekeys(Operator):
from ..utils import descendants
rep_descendants = descendants(rep)
run_mig_bbody_shapekeys(orig, rep, rep_descendants, context)
self.report({"INFO"}, "Migrate BaseBody shapekeys done.")
props = context.scene.dynamic_link_manager
if props.migbbody_manual_override and (
not props.migbbody_orig_body or not props.migbbody_rep_body
):
self.report(
{"WARNING"},
"MigBBody: no CC-style base mesh matched. Pick Original/Replacement body meshes, then run again.",
)
else:
self.report({"INFO"}, "Migrate BaseBody shapekeys done.")
return {"FINISHED"}
except Exception as e:
self.report({"ERROR"}, str(e))
+8
View File
@@ -98,6 +98,14 @@ class DLM_PT_main_panel(Panel):
# Situational
situational_box = layout.box()
situational_box.label(text="Situational Fixes", icon="QUESTION")
row = situational_box.row()
row.prop(props, "migbbody_manual_override", text="Manual body meshes")
row = situational_box.row()
row.enabled = props.migbbody_manual_override
row.prop(props, "migbbody_orig_body", text="Original body")
row = situational_box.row()
row.enabled = props.migbbody_manual_override
row.prop(props, "migbbody_rep_body", text="Replacement body")
row = situational_box.row(align=True)
row.operator("dlm.migrator_basebody_shapekeys", text="MigBBodyShapeKeys", icon="SHAPEKEY_DATA")
row = situational_box.row(align=True)
+22
View File
@@ -78,6 +78,28 @@ class DynamicLinkManagerProperties(PropertyGroup):
poll=lambda self, obj: obj and obj.type == "ARMATURE",
)
# MigBBody: manual mesh pair when CC/iClone-style auto-detection fails
migbbody_manual_override: BoolProperty(
name="Manual body meshes",
description=(
"Enable to pick original and replacement body meshes manually. "
"Auto-enables if MigBBody cannot find a base mesh (non-CC rigs)."
),
default=False,
)
migbbody_orig_body: PointerProperty(
name="Original body",
description="Original character body mesh (shape key source)",
type=bpy.types.Object,
poll=lambda self, obj: obj and obj.type == "MESH",
)
migbbody_rep_body: PointerProperty(
name="Replacement body",
description="Replacement character body mesh (shape key target)",
type=bpy.types.Object,
poll=lambda self, obj: obj and obj.type == "MESH",
)
# Tweak tools (collapsible section)
tweak_tools_section_expanded: BoolProperty(
name="Tweak Tools Expanded",