Controls a joint chain with an FK structure that's built in the opposite direction of the chain.
Intended to be used as the controlling Component for a legs IK component. Used for handling multiple foot pivot locations to maintain ground contact no matter how the foot needs to move. The leg IK control should be overdriven by the foot _attach controller, which is selectable either through the outliner, or by selecting the ball controller and pick-walking down.
At least 4 joints, ankle, ball, toe, and heel.
Any # of pivot joints can be created between the toe and the heel.
An optional IK toe wiggle control can be added by creating a floating joint parented to the toe joint.
4 Joint Reverse Foot
Optional Toe Wiggle
Reverse Foot w/side pivots
The Reverse Foot is always built in in World Space so that it can control the leg joints above it.
The first joint in the chain(ankle) will be marked up as an attachment joint in the rigging component, meaning the Reverse Foot will not apply control over it. The Leg IK chain is intended to control the ankle.
A single chain IK is built from the ankle to the ball, and the ball to the toe in order to provide a clean foot roll behavior, keeping ground contact, when rotating the ball or toe rig control.
The 'IKs - World Oriented' setting in Character Settings will determine whether the Heel control is oriented to the world when built or if it stays oriented to the foot. 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.reverse_foot.ReverseFoot().rig(skeleton_dict, side, region)