FK Control Script


This short script allows me to create an FK control on a bone that is properly aligned and oriented. With this, the Local Rotation Axis of the control will match that of the bone it is aimed at.

I can use this to better automate FK control setups that will allow for proper IK/FK blending.

import maya.cmds as cmds

class FK_CTRL(object):
    def __init__(self,child,target,name):
        # the child is the bone that will be driven by this fk control
        self.child = child
        # the target is the bone that follows the child joint and will be used to aim the ctrl = target
        # name the ctrl = name
        self.ctrl =
        self.ctrl[0] = cmds.rename(self.ctrl[0],
        self.orientGRP =,n=self.ctrl[0] + "_ORIENT")
        # move the control to the location of its child joint
        # set rotate order to YZX
        cmds.setAttr(self.ctrl[0] + ".rotateOrder",0)
        # correctly orient the control's Local Rotation Axis with an Aim Constraint
        self.aim = cmds.aimConstraint(,self.orientGRP,upVector=(0,1,0),aimVector=(1,0,0))
        self.parentConst = cmds.parentConstraint(self.ctrl,self.child,maintainOffset=1)
        cmds.hilite(self.ctrl)[0] + ".cv[0:7]",r=1)
myCtrl1 = FK_CTRL("fk_shoulder","fk_elbow","Shoulder_ANIM")
myCtrl2 = FK_CTRL("fk_elbow","fk_wrist","Elbow_ANIM")


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s