Jump to content

Having trouble with a FK to IK match button


Recommended Posts

I wrote this script for a FK, IK Controls tool. This is to get the FK rotations to match IK rotations. (I have the FK and IK working correctly). I have attached a screen shot of the tool and the script. The tool loops through the bones in reverse (from bone_3,bone_2,bone_1) storing the rotations and then setting the FK to the IK and restoring the original FK value in the FK IK blend parameter. So far when I run the script nothing happens, no errors or snapping (which the bones should snap from an FK rotation to the IK rotation and the blend parameter should stay at FK [0]). If I comment out the last line (The line that sets the original FK value) the tool works. So this leads me to think there is something wrong with the last line. But everything looks to me as to be correct. I was hoping that someone might be able to have a look at the code and see if there are any glaring mistakes that maybe I have over looked. I have attached a screen shot of the code and the Tool. Please have a look and let me know if you this looks right. I'm sorry I know this is prolly hard to understand I am not the best at explaining these things. any help is greatly appreciated.




Link to comment
Share on other sites

Hey thanks so much for having a look at my code. but its turned out to be something so insignificant!!! as it was just the "k" in my FKControl was not capitalized and I over looked it a million times! until I finally saw it. The set pending was a good suggestion though! but I just wanted to let you know why I use a set pending there. Its because if I did have a keyframe set and then I ran the script (with only a set() not setPending()) it would set a key. setPending will return the value without setting a keyframe. so that the animator isn't setting keys accidently. It forces the animator to set the key manually (warning: if autokey is on, that will override the setPending()). I really appreciate you guys giving this a shot though!! thanks



  • Like 1
Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...