How do you lock the rotation axis for armature bones in IKSolver?

Hi guys,

I’m wondering if anyone knows how to set the lockX, locY, and locZ options of the armature bones for the IK solver constraint?

For example, when you setup an IK chain for an armature bone, you can further specify that its parent bones should not rotate around certain axises. I’m wondreing how I can do this in python. The following picture shows what I mean:

I’m trying to setup the IK chain for the right hand of the armature, and I don’t want the selected bone (Abdomen) to rotate around Y and Z axises. What I’m asking is how I can access the encircled part of the GUI using python.

http://img307.imageshack.us/img307/8130/85883810dk4.jpg

Thanks a lot for reading!

-D

Ok, you’ve made me curious. Why do you want to do it via Python? So you can deactivate and reactivate it from a script?:spin:

^^ yeah pretty much. If I want to animate a motion to pick something from the ground, I have to disable rotY and rotZ of the abdomen bone, otherwise the motion just looks too unnatural. On the other hand, if I want to animate a waving motion, then it pays to allow a bit of rotation on the y axis.

guys, any ideas? :frowning:

Hmm… it doesn’t look like this is really supported by the py-api…

Aligorith

I dont use IK’s so I only mapped the options that were on default posebones, this could well be added in after 2.43 release.

Well the limit values are there (limitmin and limitmax), it’s just the flags/settings (limit/lock) that aren’t.

Aligorith

that would be fantastic!!! thanks so much! i will just make do with the limits for now.

It’s easy to set the locks with the limits, however, I’m not sure how to set the stiffness with the limits … I wonder if it would much difference. but then again, I didn’t see much influence of the stiffness on the solutions of IK … so I don’t know.

just added IK access to all those buttons.

  • CVS Log

    • added MTex uvlayer string attribute

    • added Pose attribute “ik” True/False depending on the pose bones IK.
      limitX/Y/Z bool’s
      lockX/Y/ZRot bool’s
      stiffX/Y/Z floats
      stretch (ikstretch) float