Controls a chain of joints with inverse kinematic(IK) behavior where each joint in the chain will move based on a single control at the end of the chain, and if the chain is 3 or more joints a pole vector(PV) control to handle along the IK.
Ideal for Legs to maintain ground contact and Arms if the character needs to keep their hand in place while the body is moving.
A chain of joints where the end is in the hierarchy of the start. If the chain is only 2 joints a Single-Chain solver will be used, if the chain is 3 or more joints a Rotation Plane solver with a Pole Vector will be used.
3 joint chain arm IK
The 'IKs - World Oriented' setting in Character Settings will determine whether the IK control is oriented to the world when built or if it stays oriented the same as the ending joint of the IK chain. This will save into the rigging file so you only have to set this when you initially build the component.
Run on selection of any skeleton joint.
side = Name of the side from region setup, e.g. 'left'
region = Name of the region from region setup, e.g. 'arm'
import pymel.core as pm
import rigging
skeleton_dict = rigging.skeleton.get_skeleton_dict(pm.ls(sl=True, type='joint')[0])
rigging.ik.IK().rig(skeleton_dict, side, region)