Using IK/FK snap script and run in to some problems

Using IK/FK snap script and run in to some problems

Shsfu
Explorer Explorer
571 Views
0 Replies
Message 1 of 1

Using IK/FK snap script and run in to some problems

Shsfu
Explorer
Explorer

Hi
I'm using a scrip for snapping an IK solution to FK solution and vice-versa to rig an arm using 3Ds max 2024 and after running it I ran to some problems.

This is the script:

IK_FK_Switcher_Custom_Attribute = Attributes custom_Attributes
(
rollout IKSwitchRollout "IK/FK Switch"
(
button ui_IK2FK "IK --> FK" width:100 height:30
button ui_FK2IK "FK --> IK" width:100 height:30
 
on ui_FK2IK pressed do
(
try ($'_l_Arm_Shoulder_FK_ctrl'.transform = $'CC_Base_L_Upperarm_IK'.transform) catch ()
try ($'_l_Arm_Elbow_FK_ctrl'.transform = $'CC_Base_L_Forearm_IK'.transform) catch ()
try ($'_l_Arm_EHand_FK_ctrl'.transform = $'_l_Hand_IK_ctrl'.transform) catch ()
)
 
on ui_IK2FK pressed do
(
try ($'_l_Hand_IK_ctrl'.transform = $'_l_Arm_EHand_FK_ctrl'.transform) catch()
)
)
)
CustAttributes.add $.modifiers[1] IK_FK_Switcher_Custom_Attribute

When I run it everything looks normal and the problem appears after the first time the "FK --> IK" pressed, two of FK controllers changing scale:
Shsfu_0-1706386141598.png

This is before using the FK to IK button
(Blue ctrls are for FK chain and the selected ctrl is the IK chain)

Shsfu_1-1706386351064.png
And this is after, you can see scale of the shoulder and elbow ctrl is changed.
However, problem expands by using "Transform To Zero" on FK ctrls:
Shsfu_3-1706386615650.png

As you can see position of FK ctrls changes but they still function correctly!

Please if anyone have any solution to this help me, thanks

P.S. also this action has no undo at all, so if you know any solution to that I'll be so thankful
B.R.

0 Likes
572 Views
0 Replies
Replies (0)