PDA

View Full Version : Scripting Bones with IK


McMaster
12-11-2002, 05:21 PM
Hi!
I tried to script Spinners, that rotate Bones of my modell.
Everything works fine, until I ad an IK-Handle. After this there is a script-error saying:
unknown property: "rotation" in controller:IKControl
even if the Bone I try to rotate isnt the one with the IK-Handle attached.
The code I use is:
xRotBone_armL = Bone_armL.controller.rotation.controller.x_rotation
What can I do?

LFShade
12-11-2002, 11:50 PM
unknown property: "rotation" in controller:IKControl
If you evaluate the expression Bone_armL.controller, it'll return Controller: IKControl. The IKControl controller has no "rotation" property, so when you call Bone_armL.controller.rotation.controller.x_rotation, it errors out because you're trying to access the inexistant "rotation" property of the IKControl controller.
even if the Bone I try to rotate isnt the one with the IK-Handle attached.
When you create an IK chain, every bone from the start to the end joint of the IK chain receives the IKControl controller; not just the one nearest the IK handle.
So what do you do? Well, you can't explicitly rotate a bone that's part of an IK chain, unless the IK is disabled (turned off) for that chain. And since there's no way that I've found to disable/enable IK through MAXScript, you may need to find a way around using IK chains for your bones. Either that or work out some elaborate means of positioning the IK handle programmatically.

CGTalk Moderation
01-13-2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.