Exemplo n.º 1
0
    def buildHand(self, settingsNode, fingerDict, colour, cleanup):
        ctrlSize=None
        for finger in fingerDict.keys():
            for i in range(len(fingerDict[finger])):
                if not ctrlSize:
                        ctrlSize = coreUtils.getDistance(fingerDict[finger][0], fingerDict[finger][1]) * .25
                if i > 0:
                    j2 = coreUtils.createAlignedNode(fingerDict[finger][i], 'joint',
                                                     '%s_%s_%s_translate_JNT' % (self.name, finger, str(i+1).zfill(2)))
                    j2.setParent(self.joints[-1])
                    j2.jointOrient.set(fingerDict[finger][i].jointOrient.get())
                    j2.r.set((0, 0, 0))
                    coreUtils.addParent(j2, 'group',
                                        '%s_%s_%s_translateJnt_ZERO' % (self.name, finger, str(i+1).zfill(2)))
                    self.joints.append(j2)
                j = coreUtils.createAlignedNode(fingerDict[finger][i], 'joint',
                                                '%s_%s_%s_JNT' % (self.name, finger, str(i+1).zfill(2)))

                c = controls.squareCtrl(axis='x', name='%s_%s_%s_CTRL' % (self.name, finger, str(i+1).zfill(2)),
                                        size=ctrlSize)
                coreUtils.align(c, j)
                pmc.select('%s.cv[*]' % c.name())
                pmc.scale(5.0, scaleY=1)

                if i == 0:
                    j.setParent(self.rig_grp)
                    jGrp = coreUtils.addParent(j, 'group', '%s_%s_joints_GRP' % (self.name, finger))
                    j.jointOrient.set((0, 0, 0))
                    j.r.set((0, 0, 0))
                    c.setParent(self.ctrls_grp)
                    cGrp = coreUtils.addParent(c, 'group', '%s_%s_ctrls_GRP' % (self.name, finger))
                    c.t.connect(j.t)
                    c.r.connect(j.r)
                    pmc.parentConstraint(cGrp, jGrp)
                else:
                    j.setParent(self.joints[-1])
                    j.jointOrient.set((0, 0, 0))
                    j.r.set((0, 0, 0))
                    c.setParent(self.ctrls[-1])
                    coreUtils.addParent(c, 'group', '%s_%s_%s_ZERO' % (self.name, finger, str(i+1).zfill(2)))
                    c.t.connect(j2.t)
                    c.r.connect(j.r)
                self.joints.append(j)
                self.ctrls.append(c)

        coreUtils.colorize(colour, self.ctrls)

        if settingsNode:
            pmc.addAttr(settingsNode, longName='finger_ctrls_vis', at='bool', k=0, h=0)
            pmc.setAttr(settingsNode.finger_ctrls_vis, channelBox=1)
            settingsNode.finger_ctrls_vis.connect(self.ctrls_grp.visibility)

        if cleanup:
            self.cleanup()
Exemplo n.º 2
0
        def _makeCtrl(prefix='', colour='red', pos=(0, 0, 0), grpParent=None):
            c = controls.squareCtrl(size=ctrlSize,
                                    name='%s_CTRL' % prefix,
                                    axis='z')
            c.t.set(pos)
            zero = coreUtils.addParent(c, 'group', '%sCtrl_ZERO' % prefix)
            zero.setParent(self.ctrls_grp)
            pmc.select('%s.cv[ * ]' % coreUtils.getShape(c))
            pmc.scale(.33, scaleY=1)
            coreUtils.colorize(colour, [c])
            self.ctrls.append(c)

            g = coreUtils.addChild(grpParent, 'group', '%s_DRV' % prefix)
            _addControl(g, c)

            return c, g
Exemplo n.º 3
0
        def _makeSubCtrls(parent, prefix='', colour='red', grpParent=None):
            for i in range(len(subs.keys())):
                c = controls.squareCtrl(size=ctrlSize * .15,
                                        name='%s_%s_CTRL' %
                                        (prefix, subs[i][0]),
                                        axis='z')
                coreUtils.align(c, parent, parent=1)
                c.tx.set(ctrlSize * subs[i][1])
                coreUtils.addParent(c, 'group',
                                    c.name().replace('_CTRL', 'Ctrl_ZERO'))
                coreUtils.colorize(colour, [c])
                self.ctrls.append(c)

                g = coreUtils.addChild(grpParent, 'group',
                                       '%s_%s_DRV' % (prefix, subs[i][0]))
                j = coreUtils.addChild(g, 'joint',
                                       '%s_%s_JNT' % (prefix, subs[i][0]))
                j.t.set((ctrlSize * subs[i][1], 0, 0))
                self.joints.append(j)

                c.t.connect(g.t)
Exemplo n.º 4
0
    def buildEyes(self, rtPos, lfPos):
        if not rtPos or not lfPos:
            return 'DrEyes: Please supply and right and left location for your eye rig'
        # Make Ctrls
        ctrlSize = coreUtils.getDistance(rtPos, lfPos)
        self.mainCtrl = controls.squareCtrl(axis='z',
                                            name='%s_CTRL' % self.name,
                                            size=ctrlSize)
        pmc.select('%s.cv[ * ]' % coreUtils.getShape(self.mainCtrl))
        pmc.scale(2.5, scaleX=1)
        pmc.scale(1.25, scaleY=1)
        self.ctrls.append(self.mainCtrl)
        ctrlZero = coreUtils.addParent(self.mainCtrl, 'group',
                                       '%s_ctrl_ZERO' % self.name)
        ctrlZero.setParent(self.ctrls_grp)
        midPos = coreUtils.pointsAlongVector(lfPos, rtPos)[1]
        ctrlZero.t.set((midPos[0], midPos[1], midPos[2] + (ctrlSize * 10)))

        self.rtCtrl = controls.circleCtrl(radius=ctrlSize * .25,
                                          name='rt_eye_CTRL')
        self.ctrls.append(self.rtCtrl)
        coreUtils.align(self.rtCtrl, self.mainCtrl, parent=1)
        rtCtrlZero = coreUtils.addParent(self.rtCtrl, 'group',
                                         'rt_eyeCtrl_ZERO')
        rtCtrlZero.tx.set(rtPos[0])

        self.lfCtrl = controls.circleCtrl(radius=ctrlSize * .25,
                                          name='lf_eye_CTRL')
        self.ctrls.append(self.lfCtrl)
        coreUtils.align(self.lfCtrl, self.mainCtrl, parent=1)
        lfCtrlZero = coreUtils.addParent(self.lfCtrl, 'group',
                                         'lf_eyeCtrl_ZERO')
        lfCtrlZero.tx.set(lfPos[0])
        lfCtrlZero.sx.set(-1)

        coreUtils.colorize('green', [self.mainCtrl])
        coreUtils.colorize('red', [self.rtCtrl])
        coreUtils.colorize('blue', [self.lfCtrl])

        # Set up aims
        rtGrp = coreUtils.addChild(self.rig_grp, 'group', 'rt_eye_GRP')
        rtGrp.t.set(rtPos)
        pmc.parentConstraint(self.ctrls_grp, rtGrp, mo=1)
        pmc.scaleConstraint(self.ctrls_grp, rtGrp, mo=1)

        rtAimGrp = coreUtils.addChild(rtGrp, 'group', 'rt_eyeAim_GRP')
        pmc.aimConstraint(self.rtCtrl,
                          rtAimGrp,
                          aim=(0, 0, 1),
                          wut='objectrotation',
                          wuo=rtGrp)
        rtJnt = coreUtils.addChild(rtAimGrp, 'joint', 'rt_eyeAim_JNT')
        self.joints.append(rtJnt)

        lfGrp = coreUtils.addChild(self.rig_grp, 'group', 'lf_eye_GRP')
        lfGrp.t.set(lfPos)
        pmc.parentConstraint(self.ctrls_grp, lfGrp, mo=1)
        pmc.scaleConstraint(self.ctrls_grp, lfGrp, mo=1)

        lfAimGrp = coreUtils.addChild(lfGrp, 'group', 'lf_eyeAim_GRP')
        pmc.aimConstraint(self.lfCtrl,
                          lfAimGrp,
                          aim=(0, 0, 1),
                          wut='objectrotation',
                          wuo=lfGrp)
        lfJnt = coreUtils.addChild(lfAimGrp, 'joint', 'lf_eyeAim_JNT')
        self.joints.append(lfJnt)

        # softness
        pmc.addAttr(self.main_grp,
                    longName='eye_pull',
                    minValue=0.0,
                    maxValue=1.0,
                    at='double',
                    k=1,
                    h=0)
        eyePullRev = coreUtils.reverse(self.main_grp.eye_pull,
                                       name='rev_eyePull_UTL')

        rtSoftGrp = coreUtils.addChild(rtGrp, 'group', 'rt_eyeSoft_GRP')
        rtSoftJnt = coreUtils.addChild(rtSoftGrp, 'joint', 'rt_soft_JNT')
        self.joints.append(rtSoftJnt)
        con = pmc.orientConstraint(rtGrp, rtAimGrp, rtSoftGrp)
        con.interpType.set(2)
        w0 = pmc.Attribute('%s.%sW0' % (con.name(), rtGrp.name()))
        w1 = pmc.Attribute('%s.%sW1' % (con.name(), rtAimGrp.name()))
        self.main_grp.eye_pull.connect(w1)
        eyePullRev.outputX.connect(w0)

        lfSoftGrp = coreUtils.addChild(lfGrp, 'group', 'lf_eyeSoft_GRP')
        lfSoftJnt = coreUtils.addChild(lfSoftGrp, 'joint', 'lf_soft_JNT')
        self.joints.append(lfSoftJnt)
        con = pmc.orientConstraint(lfGrp, lfAimGrp, lfSoftGrp)
        con.interpType.set(2)
        w0 = pmc.Attribute('%s.%sW0' % (con.name(), lfGrp.name()))
        w1 = pmc.Attribute('%s.%sW1' % (con.name(), lfAimGrp.name()))
        self.main_grp.eye_pull.connect(w1)
        eyePullRev.outputX.connect(w0)

        #############################################################################################################
        # Lids

        pmc.addAttr(self.main_grp,
                    ln='lids_rotate_factor',
                    at='double',
                    k=0,
                    h=0)
        pmc.setAttr(self.main_grp.lids_rotate_factor, channelBox=1)
        self.main_grp.lids_rotate_factor.set(-10)
        pmc.addAttr(self.main_grp,
                    ln='lids_auto',
                    at='double',
                    k=0,
                    h=0,
                    minValue=0.0,
                    maxValue=1.0)
        self.main_grp.lids_auto.set(1.0)

        rtLidGrp = coreUtils.addChild(self.rig_grp, 'group', 'rt_lids_GRP')
        coreUtils.align(rtLidGrp, rtGrp)

        # rt_top
        rtTopLidZero = coreUtils.addChild(rtLidGrp, 'group', 'rt_topLid_ZERO')
        rtTopLidAutoGrp = coreUtils.addChild(rtTopLidZero, 'group',
                                             'rt_topLidAuto_GRP')
        md = coreUtils.multiply(rtAimGrp.rx,
                                self.main_grp.lids_auto,
                                name='md_rtLidsAuto_UTL')
        md.outputX.connect(rtTopLidAutoGrp.rx)

        # rt_btm
        rtBtmLidZero = coreUtils.addChild(rtLidGrp, 'group', 'rt_btmLid_ZERO')
        rtBtmLidAutoGrp = coreUtils.addChild(rtBtmLidZero, 'group',
                                             'rt_btmLidAuto_GRP')
        md.outputX.connect(rtBtmLidAutoGrp.rx)

        # lf_top
        lfLidGrp = coreUtils.addChild(self.rig_grp, 'group', 'lf_lids_GRP')
        coreUtils.align(lfLidGrp, lfGrp)

        lfTopLidZero = coreUtils.addChild(lfLidGrp, 'group', 'lf_topLid_ZERO')
        lfTopLidAutoGrp = coreUtils.addChild(lfTopLidZero, 'group',
                                             'lf_topLidAuto_GRP')
        md = coreUtils.multiply(lfAimGrp.rx,
                                self.main_grp.lids_auto,
                                name='md_lfLidsAuto_UTL')
        md.outputX.connect(lfTopLidAutoGrp.rx)

        # lf_btm
        lfBtmLidZero = coreUtils.addChild(lfLidGrp, 'group', 'lf_btmLid_ZERO')
        lfBtmLidAutoGrp = coreUtils.addChild(lfBtmLidZero, 'group',
                                             'lf_btmLidAuto_GRP')
        md.outputX.connect(lfBtmLidAutoGrp.rx)

        def _addControl(slave, driver):
            md = coreUtils.multiply(driver.ty,
                                    self.main_grp.lids_rotate_factor,
                                    name='md_%s_UTL' %
                                    driver.name().replace('_CTRL', ''))
            md.outputX.connect(slave.rx)

        # CTRLS
        def _makeCtrl(prefix='', colour='red', pos=(0, 0, 0), grpParent=None):
            c = controls.squareCtrl(size=ctrlSize,
                                    name='%s_CTRL' % prefix,
                                    axis='z')
            c.t.set(pos)
            zero = coreUtils.addParent(c, 'group', '%sCtrl_ZERO' % prefix)
            zero.setParent(self.ctrls_grp)
            pmc.select('%s.cv[ * ]' % coreUtils.getShape(c))
            pmc.scale(.33, scaleY=1)
            coreUtils.colorize(colour, [c])
            self.ctrls.append(c)

            g = coreUtils.addChild(grpParent, 'group', '%s_DRV' % prefix)
            _addControl(g, c)

            return c, g

        def _makeSubCtrls(parent, prefix='', colour='red', grpParent=None):
            for i in range(len(subs.keys())):
                c = controls.squareCtrl(size=ctrlSize * .15,
                                        name='%s_%s_CTRL' %
                                        (prefix, subs[i][0]),
                                        axis='z')
                coreUtils.align(c, parent, parent=1)
                c.tx.set(ctrlSize * subs[i][1])
                coreUtils.addParent(c, 'group',
                                    c.name().replace('_CTRL', 'Ctrl_ZERO'))
                coreUtils.colorize(colour, [c])
                self.ctrls.append(c)

                g = coreUtils.addChild(grpParent, 'group',
                                       '%s_%s_DRV' % (prefix, subs[i][0]))
                j = coreUtils.addChild(g, 'joint',
                                       '%s_%s_JNT' % (prefix, subs[i][0]))
                jEnd = coreUtils.addChild(
                    j, 'joint', '%s_%sEnd_JNT' % (prefix, subs[i][0]))
                jEnd.t.set((ctrlSize * subs[i][1], 0, ctrlSize * .33))
                self.joints.append(jEnd)

                _addControl(g, c)

        subs = {0: ['in', .33], 1: ['mid', 0], 2: ['out', -.33]}
        # rt top lid
        c, g = _makeCtrl('rt_topLid', 'red',
                         (rtPos[0], rtPos[1] +
                          (ctrlSize * .33), rtPos[2] + ctrlSize),
                         rtTopLidAutoGrp)
        _makeSubCtrls(c, 'rt_topLid', 'red', g)

        # rt btm lid
        c, g = _makeCtrl('rt_btmLid', 'red',
                         (rtPos[0], rtPos[1] +
                          (ctrlSize * -.33), rtPos[2] + ctrlSize),
                         rtBtmLidAutoGrp)
        _makeSubCtrls(c, 'rt_btmLid', 'red', g)

        subs = {0: ['in', -.33], 1: ['mid', 0], 2: ['out', .33]}

        # lf top lid
        c, g = _makeCtrl('lf_topLid', 'blue',
                         (lfPos[0], lfPos[1] +
                          (ctrlSize * .33), lfPos[2] + ctrlSize),
                         lfTopLidAutoGrp)
        _makeSubCtrls(c, 'lf_topLid', 'blue', g)

        #lf btm lid
        c, g = _makeCtrl('lf_btmLid', 'blue',
                         (lfPos[0], lfPos[1] +
                          (ctrlSize * -.33), lfPos[2] + ctrlSize),
                         lfBtmLidAutoGrp)
        _makeSubCtrls(c, 'lf_btmLid', 'blue', g)
Exemplo n.º 5
0
    def buildArm(self, colour, numTwistSegs, flipTwist, upAxis):
        self.bendyCtrls_grp = coreUtils.addChild(self.main_grp,
                                                 'group',
                                                 name='%s_bendyCtrls_GRP' %
                                                 self.name)
        pmc.addAttr(self.settingsCtrl,
                    longName='bendy_ctrls_vis',
                    at='bool',
                    k=1,
                    h=0)
        pmc.setAttr(self.settingsCtrl.bendy_ctrls_vis, k=0, channelBox=1)
        self.settingsCtrl.bendy_ctrls_vis.connect(
            self.bendyCtrls_grp.visibility)

        # Elbow ctr
        aimVec = (1, 0, 0)
        if flipTwist:
            aimVec = (-1, 0, 0)
        elbowAim = coreUtils.addChild(self.const_grp, 'locator',
                                      '%s_elbowOrient_LOC' % self.name)
        pmc.aimConstraint(self.tripleChain['resultChain'][2],
                          elbowAim,
                          mo=0,
                          wut='objectRotation',
                          wuo=self.topTwist['nonRoll'],
                          aimVector=aimVec)
        ctrlSize = coreUtils.getDistance(
            self.tripleChain['resultChain'][0],
            self.tripleChain['resultChain'][1]) * .25
        self.elbowCtrl = controls.squareCtrl(axis='x',
                                             size=ctrlSize,
                                             name='%s_elbow_CTRL' % self.name)
        self.elbowCtrl.setParent(self.bendyCtrls_grp)
        elbowZero = coreUtils.addParent(self.elbowCtrl, 'group',
                                        '%s_elbowCtrl_ZERO' % self.name)
        pmc.pointConstraint(self.tripleChain['resultChain'][1],
                            elbowZero,
                            mo=0)
        pmc.orientConstraint(elbowAim, elbowZero, mo=0)
        self.ctrls.append(self.elbowCtrl)

        # Twisty Segments
        # Upper twist
        twistAxis = 'x'
        if flipTwist:
            twistAxis = '-x'

        self.upperTwist = drTwistySegment.DrTwistySegmentCurve(
            name='%s_upperTwist' % self.name,
            start=self.tripleChain['resultChain'][0],
            end=self.tripleChain['resultChain'][1],
            numSegs=numTwistSegs,
            numCtrls=2,
            axis=twistAxis,
            upAxis=upAxis,
            worldUpAxis=upAxis,
            colour=colour,
            flipTwist=flipTwist,
            upNode=self.tripleChain['resultChain'][0],
            cleanup=1)
        self.upperTwist.main_grp.setParent(self.bendyCtrls_grp)
        self.upperTwist.main_grp.inheritsTransform.set(0)
        pmc.parentConstraint(self.topTwist['nonRoll'],
                             self.upperTwist.start_grp,
                             mo=0)
        pmc.pointConstraint(self.elbowCtrl, self.upperTwist.end_grp, mo=0)
        self.main_grp.mid_twist.connect(self.upperTwist.twist_pma.input1D[0])
        elbowTwist_inv = coreUtils.convert(self.elbowCtrl.rx,
                                           -57.2958,
                                           name='uc_%s_elbowTwistInvert_UTL' %
                                           self.name)
        elbowTwist_inv.output.connect(self.upperTwist.twist_pma.input1D[1])
        '''
        if flipTwist:
            self.elbowCtrl.rx.connect(self.upperTwist.twist_pma.input1D[1])
        else:
            elbowTwist_inv.output.connect(self.upperTwist.twist_pma.input1D[1])
        '''
        pmc.parentConstraint(self.elbowCtrl,
                             self.upperTwist.bendyTargs[-1],
                             mo=1)

        self.main_grp.globalScale.connect(self.upperTwist.main_grp.globalScale)

        # Lower twist
        self.lowerTwist = drTwistySegment.DrTwistySegmentCurve(
            name='%s_lowerTwist' % self.name,
            start=self.tripleChain['resultChain'][1],
            end=self.tripleChain['resultChain'][2],
            numSegs=numTwistSegs,
            numCtrls=2,
            axis=twistAxis,
            upAxis=upAxis,
            worldUpAxis=upAxis,
            colour=colour,
            flipTwist=flipTwist,
            upNode=self.tripleChain['resultChain'][1],
            cleanup=1)
        self.lowerTwist.main_grp.setParent(self.bendyCtrls_grp)
        self.lowerTwist.main_grp.inheritsTransform.set(0)
        p = pmc.parentConstraint(self.elbowCtrl,
                                 self.lowerTwist.start_grp,
                                 mo=0)
        self.main_grp.mid_twist.connect(
            p.target[0].targetOffsetRotate.targetOffsetRotateX)
        self.elbowCtrl.rx.connect(self.lowerTwist.twist_pma.input1D[1])
        '''
        if flipTwist:
            uc = coreUtils.convert(self.main_grp.mid_twist, -.017, name='uc_%s_midTwistInvert_UTL' % self.name)
            uc.output.connect(p.target[0].targetOffsetRotate.targetOffsetRotateX)
            elbowTwist_inv.output.connect(self.lowerTwist.twist_pma.input1D[1])
        else:
            self.main_grp.mid_twist.connect(p.target[0].targetOffsetRotate.targetOffsetRotateX)
            self.elbowCtrl.rx.connect(self.lowerTwist.twist_pma.input1D[1])
        '''
        pmc.parentConstraint(self.tripleChain['resultChain'][2],
                             self.lowerTwist.end_grp,
                             mo=0)
        self.main_grp.btm_twist.connect(self.lowerTwist.twist_pma.input1D[0])
        self.main_grp.globalScale.connect(self.lowerTwist.main_grp.globalScale)
        pmc.parentConstraint(self.elbowCtrl,
                             self.lowerTwist.bendyTargs[0],
                             mo=1)

        # Average joints
        startAvgJnt = coreUtils.addChild(self.rig_grp, 'joint',
                                         '%s_startAvg_JNT' % self.name)
        pmc.parentConstraint(self.const_grp,
                             self.topTwist['nonRoll'],
                             startAvgJnt,
                             mo=0).interpType.set(2)

        elbowAvgJnt = coreUtils.addChild(self.rig_grp, 'joint',
                                         '%s_midAvg_JNT' % self.name)
        pmc.parentConstraint(self.upperTwist.joints[-1],
                             self.lowerTwist.joints[0],
                             elbowAvgJnt,
                             mo=0).interpType.set(2)

        wristAvgJnt = coreUtils.addChild(self.rig_grp, 'joint',
                                         '%s_endAvg_JNT' % self.name)
        pmc.parentConstraint(self.lowerTwist.joints[-1],
                             self.tripleChain['resultChain'][2],
                             wristAvgJnt,
                             mo=0).interpType.set(2)

        # add joints for publishing
        self.joints.append(startAvgJnt)
        for joint in self.upperTwist.joints:
            self.joints.append(joint)
        self.joints.append(elbowAvgJnt)
        for joint in self.lowerTwist.joints:
            self.joints.append(joint)
        self.joints.append(wristAvgJnt)

        coreUtils.colorize(colour, self.ctrls)
Exemplo n.º 6
0
    def buildFoot(self, ankle, foot, ball, toe, inner, outer, heel,
                  settingsNode, blendAttr, colour, cleanup):

        # Make duplicate joint chains
        self.tripleChain = systemUtils.tripleChain(
            joints=[ankle, foot, ball, toe], name=self.name, flip=0)
        ikConst_grp = coreUtils.addParent(self.tripleChain['ikChain'][0],
                                          'group',
                                          '%s_ikConst_GRP' % self.name)
        fkConst_grp = coreUtils.addParent(self.tripleChain['fkChain'][0],
                                          'group',
                                          '%s_fkConst_GRP' % self.name)
        resultConst_grp = coreUtils.addParent(
            self.tripleChain['resultChain'][0], 'group',
            '%s_resultConst_GRP' % self.name)

        self.tripleChain['main_grp'].setParent(self.rig_grp)

        if blendAttr:
            par = pmc.parentConstraint(ikConst_grp,
                                       fkConst_grp,
                                       resultConst_grp,
                                       mo=0)
            attr = pmc.Attribute('%s.%sW1' % (par.name(), fkConst_grp.name()))
            blendAttr.connect(attr)
            attr = pmc.Attribute('%s.%sW0' % (par.name(), ikConst_grp.name()))
            blend_rev = coreUtils.reverse(blendAttr,
                                          'reverse_%s_blend, UTL' % self.name)
            blend_rev.outputX.connect(attr)

            for bc in self.tripleChain['blendColors']:
                blendAttr.connect(bc.blender)

        # Orientation for controls
        axis = 'x'
        if self.tripleChain['resultChain'][1].tx.get() < 0.0:
            axis = '-x'
        ctrlSize = coreUtils.getDistance(
            self.tripleChain['resultChain'][0],
            self.tripleChain['resultChain'][1]) * .5

        # ikHandles
        footIkHandle = pmc.ikHandle(solver='ikRPsolver',
                                    name='%s_foot_ikHandle' % self.name,
                                    startJoint=self.tripleChain['ikChain'][0],
                                    endEffector=self.tripleChain['ikChain'][1],
                                    setupForRPsolver=1)[0]
        footIkHandle.setParent(self.rig_grp)
        footIkHandleConst = coreUtils.addParent(
            footIkHandle, 'group', '%s_footIkHandle_CONST' % self.name)

        ballIkHandle = pmc.ikHandle(solver='ikRPsolver',
                                    name='%s_ball_ikHandle' % self.name,
                                    startJoint=self.tripleChain['ikChain'][1],
                                    endEffector=self.tripleChain['ikChain'][2],
                                    setupForRPsolver=1)[0]
        ballIkHandle.setParent(self.rig_grp)
        ballIkHandleConst = coreUtils.addParent(
            ballIkHandle, 'group', '%s_ballIkHandle_CONST' % self.name)

        toeIkHandle = pmc.ikHandle(solver='ikRPsolver',
                                   name='%s_toe_ikHandle' % self.name,
                                   startJoint=self.tripleChain['ikChain'][2],
                                   endEffector=self.tripleChain['ikChain'][3],
                                   setupForRPsolver=1)[0]
        toeIkHandle.setParent(self.rig_grp)
        toeIkHandleConst = coreUtils.addParent(
            toeIkHandle, 'group', '%s_toeIkHandle_CONST' % self.name)

        # ikCtrls
        self.heelIkCtrl = controls.squareCtrl(name='%s_heel_ik_CTRL' %
                                              self.name,
                                              axis=axis,
                                              size=ctrlSize)
        coreUtils.align(self.heelIkCtrl, heel)
        self.heelIkCtrl.setParent(self.ctrls_grp)
        self.ikCtrls_grp = coreUtils.addParent(self.heelIkCtrl, 'group',
                                               '%s_ikCtrls_GRP' % self.name)
        coreUtils.addParent(self.heelIkCtrl, 'group',
                            '%s_heelIkCtrl_ZERO' % self.name)
        self.ctrls.append(self.heelIkCtrl)

        self.toeIkCtrl = controls.squareCtrl(name='%s_toe_ik_CTRL' % self.name,
                                             axis=axis,
                                             size=ctrlSize)
        coreUtils.align(self.toeIkCtrl, self.tripleChain['ikChain'][3])
        self.toeIkCtrl.setParent(self.heelIkCtrl)
        coreUtils.addParent(self.toeIkCtrl, 'group',
                            '%s_toeIkCtrl_ZERO' % self.name)
        self.ctrls.append(self.toeIkCtrl)

        self.innerLoc = coreUtils.createAlignedNode(inner, 'group',
                                                    '%s_inner_GRP' % self.name)
        self.innerLoc.setParent(self.toeIkCtrl)
        innerZero = coreUtils.addParent(self.innerLoc, 'group',
                                        '%s_inner_ZERO' % self.name)

        self.outerLoc = coreUtils.createAlignedNode(outer, 'group',
                                                    '%s_outer_GRP' % self.name)
        self.outerLoc.setParent(self.innerLoc)
        outerZero = coreUtils.addParent(self.outerLoc, 'group',
                                        '%s_outer_ZERO' % self.name)

        self.ballPivotIkCtrl = controls.squareCtrl(
            name='%s_ballPivot_ik_CTRL' % self.name, axis=axis, size=ctrlSize)
        coreUtils.align(self.ballPivotIkCtrl, self.tripleChain['ikChain'][2])
        self.ballPivotIkCtrl.setParent(self.outerLoc)
        coreUtils.addParent(self.ballPivotIkCtrl, 'group',
                            '%s_ballPivotIkCtrl_ZERO' % self.name)
        inv_grp = coreUtils.addParent(self.ballPivotIkCtrl, 'group',
                                      '%s_ballPivotIkCtrlRotX_INV' % self.name)
        inv_uc = coreUtils.convert(self.ballPivotIkCtrl.rx,
                                   -1.0,
                                   name='uc_%s_ballPivotIkCtrlRotX_UTL' %
                                   self.name)
        inv_uc.output.connect(inv_grp.rx)

        pmc.parentConstraint(self.ballPivotIkCtrl, toeIkHandleConst, mo=1)
        self.ctrls.append(self.ballPivotIkCtrl)

        self.ballPivotIkCtrl.rx.connect(self.outerLoc.rx)
        pmc.transformLimits(self.innerLoc, rx=(-45, 0), erx=(0, 1))

        self.ballPivotIkCtrl.rx.connect(self.innerLoc.rx)
        pmc.transformLimits(self.outerLoc, rx=(0, 45), erx=(1, 0))

        self.ballIkCtrl = controls.squareCtrl(name='%s_ball_ik_CTRL' %
                                              self.name,
                                              axis=axis,
                                              size=ctrlSize)
        coreUtils.align(self.ballIkCtrl, self.tripleChain['ikChain'][2])
        self.ballIkCtrl.setParent(self.ballPivotIkCtrl)
        coreUtils.addParent(self.ballIkCtrl, 'group',
                            '%s_ballIkCtrl_ZERO' % self.name)
        pmc.parentConstraint(self.ballIkCtrl, ballIkHandleConst, mo=1)
        self.ctrls.append(self.ballIkCtrl)

        self.footIkCtrl = controls.squareCtrl(name='%s_foot_ik_CTRL' %
                                              self.name,
                                              axis=axis,
                                              size=ctrlSize)
        coreUtils.align(self.footIkCtrl, self.tripleChain['ikChain'][1])
        self.footIkCtrl.setParent(self.ballIkCtrl)
        coreUtils.addParent(self.footIkCtrl, 'group',
                            '%s_footIkCtrl_ZERO' % self.name)
        pmc.parentConstraint(self.footIkCtrl, footIkHandleConst, mo=1)
        pmc.parentConstraint(self.footIkCtrl, ikConst_grp, mo=1)
        self.ctrls.append(self.footIkCtrl)

        # fkCtrls
        self.footFkCtrl = controls.squareCtrl(name='%s_foot_fk_CTRL' %
                                              self.name,
                                              axis=axis,
                                              size=ctrlSize)
        coreUtils.align(self.footFkCtrl, self.tripleChain['fkChain'][1])
        self.footFkCtrl.setParent(self.ctrls_grp)
        self.fkCtrls_grp = coreUtils.addParent(self.footFkCtrl, 'group',
                                               '%s_fkCtrls_GRP' % self.name)
        coreUtils.addParent(self.footFkCtrl, 'group',
                            '%s_footFkCtrl_ZERO' % self.name)
        pmc.parentConstraint(self.footFkCtrl, self.tripleChain['fkChain'][1])
        self.ctrls.append(self.footFkCtrl)

        self.ballFkCtrl = controls.squareCtrl(name='%s_ball_fk_CTRL' %
                                              self.name,
                                              axis=axis,
                                              size=ctrlSize)
        coreUtils.align(self.ballFkCtrl, self.tripleChain['fkChain'][2])
        self.ballFkCtrl.setParent(self.footFkCtrl)
        coreUtils.addParent(self.ballFkCtrl, 'group',
                            '%s_ballFkCtrl_ZERO' % self.name)
        pmc.parentConstraint(self.ballFkCtrl, self.tripleChain['fkChain'][2])
        self.ctrls.append(self.ballFkCtrl)

        coreUtils.colorize(colour, self.ctrls)

        for ctrl in self.ctrls:
            pmc.select('%s.cv[*]' % ctrl.name())
            if ctrl != self.ballPivotIkCtrl:
                pmc.scale(3.0, scaleZ=1)
            else:
                pmc.scale(3.0, scaleY=1)

        pmc.parentConstraint(self.fkCtrls_grp, fkConst_grp, mo=1)

        for joint in self.tripleChain['resultChain']:
            self.joints.append(joint)

        # connections
        self.exposeSockets({'ikFoot': self.tripleChain['ikChain'][0]})

        if cleanup:
            self.cleanup()