sauzer
03-17-2006, 01:54 AM
Here at the studio, we all want to have a rig that has the IK always following the FK and viceversa. AT ALL TIMES. Right now the way we do it is to switch from IK to FK (or back) and then I made a script that aligns the controls for example if you are switching from FK to IK, the script point and orient constraint the IK controller to the FK wrist controller and then deletes the constraint.
so basically the switch is done in 2 steps:
1) going from FK to IK
2) press a button that launches the IKFK_Snap which aligns the controls
NOW..
I am looking into using scriptJob in order to automate this. I would like to have Maya launching the "IKFK_Snap" script when we switch. so I made these 2 scriptJob and I put them in a script node in the character's scene:
scriptJob -kws -attributeChange switches_ctrl.LeftArm_IK L_armIKFK_Snap; //for the Left Arm
scriptJob -kws -attributeChange switches_ctrl.RightArm_IK R_armIKFK_Snap; //for the right arm
It works very well until we start to animate. The reason is that (I hope I can explain myself well enough) when the animator changes the current time and goes over a keyframe that makes the switch, Maya sees it as a "-attributeChange" , it will launch the IKFK_Snap script and that will cause the alignment between the controller making the whole thing pretty weird and not working properly.
My question is.... is there a way to tell the scriptJob the difference between USER changing the value and value changed just because I am changing the time?
Please I need help with this. If you don't understand what I am trying to eaplain let me know so I will try and explain it better.
Thank you very much
so basically the switch is done in 2 steps:
1) going from FK to IK
2) press a button that launches the IKFK_Snap which aligns the controls
NOW..
I am looking into using scriptJob in order to automate this. I would like to have Maya launching the "IKFK_Snap" script when we switch. so I made these 2 scriptJob and I put them in a script node in the character's scene:
scriptJob -kws -attributeChange switches_ctrl.LeftArm_IK L_armIKFK_Snap; //for the Left Arm
scriptJob -kws -attributeChange switches_ctrl.RightArm_IK R_armIKFK_Snap; //for the right arm
It works very well until we start to animate. The reason is that (I hope I can explain myself well enough) when the animator changes the current time and goes over a keyframe that makes the switch, Maya sees it as a "-attributeChange" , it will launch the IKFK_Snap script and that will cause the alignment between the controller making the whole thing pretty weird and not working properly.
My question is.... is there a way to tell the scriptJob the difference between USER changing the value and value changed just because I am changing the time?
Please I need help with this. If you don't understand what I am trying to eaplain let me know so I will try and explain it better.
Thank you very much
