migfkrot working for 1 frame

This commit is contained in:
Nathan
2026-03-09 15:15:19 -06:00
parent 32a292477a
commit 440b206116
7 changed files with 4617 additions and 2762 deletions
+27
View File
@@ -403,6 +403,32 @@ class DLM_OT_migrator_basebody_shapekeys(Operator):
return {"CANCELLED"}
class DLM_OT_migrator_fk_rotations(Operator):
bl_idname = "dlm.migrator_fk_rotations"
bl_label = "MigFKRot"
bl_description = "Copy FK arm and finger rotations from original to replacement (uses copy_pose_vis_rot)"
bl_icon = "BONE_DATA"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
orig, rep = _get_migrator_pair(context)
if not orig or not rep or orig == rep:
self.report({"ERROR"}, "No valid character pair.")
return {"CANCELLED"}
try:
from ..ops.fk_rotations import copy_fk_rotations
ok, msg = copy_fk_rotations(context, orig, rep)
if ok:
self.report({"INFO"}, msg)
return {"FINISHED"}
else:
self.report({"ERROR"}, msg)
return {"CANCELLED"}
except Exception as e:
self.report({"ERROR"}, str(e))
return {"CANCELLED"}
MIGRATOR_STEP_OPS = (
"dlm.migrator_copy_attributes",
"dlm.migrator_migrate_nla",
@@ -691,4 +717,5 @@ OPERATOR_CLASSES = [
DLM_OT_tweak_add_both,
DLM_OT_tweak_remove_both,
DLM_OT_tweak_bake_both,
DLM_OT_migrator_fk_rotations,
]
+2
View File
@@ -93,6 +93,8 @@ class DLM_PT_main_panel(Panel):
row.operator("dlm.migrator_bone_constraints", text="MigBoneConst", icon="CONSTRAINT_BONE")
row.operator("dlm.migrator_retarget_relations", text="RetargRelatives", icon="ORIENTATION_PARENT")
row.operator("dlm.migrator_basebody_shapekeys", text="MigBBodyShapeKeys", icon="SHAPEKEY_DATA")
row = box.row()
row.operator("dlm.migrator_fk_rotations", text="MigFKRot", icon="BONE_DATA")
# Tweak Tools
tweak_box = layout.box()