Notifications
Clear all

[Closed] IK<->fk script problem

I’m trying to make a rig that allows switching from ik to fk on the fly. I thought changing $.transform.controller.enabled value in the ik chain would be the simplest and most stable solution, but the problem is that the orientation of the bones is not preserved and they jump to their preferred orientations. When I press the enabled button in the ik solver properties it works fine and gives this to the macrorecorder:
$Lforearm.transform.controller.PrefXAngle = 1.46692e-005
$Lforearm.transform.controller.PrefYAngle = -1.80956
$Lforearm.transform.controller.PrefZAngle = -0.000628377
$Lupperarm.transform.controller.PrefXAngle = 36.0386
$Lupperarm.transform.controller.PrefYAngle = 1.20199
$Lupperarm.transform.controller.PrefZAngle = 9.80372
I have tried storing rotation values to variables and then reloading them back again but that doesn’t do much because they are relative to the solver (I guess). Anyone know where max gets those values that are set when “enabled” is pressed? I could use the enabled button itself but there are also other actions that need to be done and I would prefer having them all automated.