midicon Posted December 15, 2015 Share Posted December 15, 2015 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. Rob Quote Link to comment Share on other sites More sharing options...
Atom Posted December 15, 2015 Share Posted December 15, 2015 I had to look up setPending to determine what it did. Have you tried just using set() instead? You don't have any key frames yet...right? Quote Link to comment Share on other sites More sharing options...
michael Posted December 15, 2015 Share Posted December 15, 2015 setPending() takes a tuple - I think you're giving it a single float... set() should work Quote Link to comment Share on other sites More sharing options...
midicon Posted December 17, 2015 Author Share Posted December 17, 2015 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 Rob 1 Quote Link to comment Share on other sites More sharing options...
MapaSmr Posted July 28, 2016 Share Posted July 28, 2016 midicon, please tell me, how did you start the characterRigging1.pyc on new versions of Houdini? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.