setup_ik_chain
Configure inverse kinematics on a limb's last bone so the chain follows a target, with an optional pole target to control joint bend direction.
Instructions
Give a limb inverse kinematics: move the target and the chain follows.
Put the IK on the last bone of the limb (forearm, shin). A pole target (an empty or bone in front of the knee or behind the elbow) keeps the joint bending the right way.
Args: armature_name: Armature object. bone_name: Last bone of the chain (the IK sits on it). target_object: Object the chain reaches for (often the armature itself when target_bone names a control bone). target_bone: Bone in target_object to reach for, if any. chain_count: Bones in the chain counting up from bone_name, 0 to 255 (0 means the whole chain to the root). pole_object: Object that sets the joint's bend direction, if any. pole_bone: Bone in pole_object, if any. pole_angle: Rotate the pole's effect, radians, -3.142 to 3.142; -1.571 (-90 degrees) is a common fix for a twisted limb. use_stretch: Let bones stretch to reach a target out of range. iterations: Solver iterations, 1 to 10000.
Returns: Dict with the constraint and chain details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bone_name | Yes | ||
| pole_bone | No | ||
| iterations | No | ||
| pole_angle | No | ||
| chain_count | No | ||
| pole_object | No | ||
| target_bone | No | ||
| use_stretch | No | ||
| armature_name | Yes | ||
| target_object | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||