Пример #1
0
    def createToesRig(self, *args):
        """
        Create fk attributes/controls on toe joints 
        on foot control.
        """
        if self.side == 1:
            # Left
            jntNames = self.sNames.feetJoints.keys()

            temp = self.sNames.feetJoints['left_pinkyToe1'].split('_')
            leftAttName1 = temp[1]
            temp = self.sNames.feetJoints['left_ringToe1'].split('_')
            leftAttName2 = temp[1]
            temp = self.sNames.feetJoints['left_middleToe1'].split('_')
            leftAttName3 = temp[1]
            temp = self.sNames.feetJoints['left_indexToe1'].split('_')
            leftAttName4 = temp[1]
            temp = self.sNames.feetJoints['left_bigToe1'].split('_')
            leftAttName5 = temp[1]

            leftAttNames = [
                leftAttName1, leftAttName2, leftAttName3, leftAttName4,
                leftAttName5
            ]

            leftStartJoints = [
                self.sNames.feetJoints['left_pinkyToe1'],
                self.sNames.feetJoints['left_ringToe1'],
                self.sNames.feetJoints['left_middleToe1'],
                self.sNames.feetJoints['left_indexToe1'],
                self.sNames.feetJoints['left_bigToe1']
            ]

            leftEndJoints = [
                self.sNames.feetJoints['left_pinkyToe3'],
                self.sNames.feetJoints['left_ringToe3'],
                self.sNames.feetJoints['left_middleToe3'],
                self.sNames.feetJoints['left_indexToe3'],
                self.sNames.feetJoints['left_bigToe3']
            ]

            # Create the controllers @ todo - setup inputs/variables for curl, twist & spread vs constants
            createFingersOrToesRig.createFingersOrToesRig(
                label='%s_foot' % self.sNames.prefix['left'],
                control=self.sNames.controlNames['left_foot'],
                attNames=leftAttNames,
                startJnts=leftStartJoints,
                endJnts=leftEndJoints,
                curl='Z',
                twist='X',
                spread='Y',
                fkNormal=self.fkNormal,
                radius=self.fkRadius / 2.0)

        if self.side == 2:
            # Right
            temp = self.sNames.feetJoints['right_pinkyToe1'].split('_')
            rightAttName1 = temp[1]
            temp = self.sNames.feetJoints['right_ringToe1'].split('_')
            rightAttName2 = temp[1]
            temp = self.sNames.feetJoints['right_middleToe1'].split('_')
            rightAttName3 = temp[1]
            temp = self.sNames.feetJoints['right_indexToe1'].split('_')
            rightAttName4 = temp[1]
            temp = self.sNames.feetJoints['right_bigToe1'].split('_')
            rightAttName5 = temp[1]

            rightAttNames = [
                rightAttName1, rightAttName2, rightAttName3, rightAttName4,
                rightAttName5
            ]

            rightStartJoints = [
                self.sNames.feetJoints['right_pinkyToe1'],
                self.sNames.feetJoints['right_ringToe1'],
                self.sNames.feetJoints['right_middleToe1'],
                self.sNames.feetJoints['right_indexToe1'],
                self.sNames.feetJoints['right_bigToe1']
            ]

            rightEndJoints = [
                self.sNames.feetJoints['right_pinkyToe3'],
                self.sNames.feetJoints['right_ringToe3'],
                self.sNames.feetJoints['right_middleToe3'],
                self.sNames.feetJoints['right_indexToe3'],
                self.sNames.feetJoints['right_bigToe3']
            ]

            createFingersOrToesRig.createFingersOrToesRig(
                label='%s_foot' % self.sNames.prefix['right'],
                control=self.sNames.controlNames['right_foot'],
                attNames=rightAttNames,
                startJnts=rightStartJoints,
                endJnts=rightEndJoints,
                curl='Z',
                twist='X',
                spread='Y',
                fkNormal=self.fkNormal,
                radius=self.fkRadius / 2.0)
        #--- Call: self.toeCntSetup()
        self.toeCntSetup()
Пример #2
0
    def create(self,*args):
        """
        Given input, create the hand rig.
        """        
        # Names derived from keys in standard joint names dictionary.
        
        #--- Setup orient switch on hand controls
        self.orientConstraintOnHands()
        
        #--- Setup the palm cup / bend on the hand controls.
        self.palmSetup()
        
        # Left
        jntNames = self.sNames.handJoints.keys()
        
        temp = self.sNames.handJoints['left_pinky1'].split('_')
        leftAttName1 = temp[1]
        temp = self.sNames.handJoints['left_ring1'].split('_')
        leftAttName2 = temp[1]
        temp = self.sNames.handJoints['left_middle1'].split('_')
        leftAttName3 = temp[1]
        temp = self.sNames.handJoints['left_index1'].split('_')
        leftAttName4 = temp[1]
        temp = self.sNames.handJoints['left_thumb1'].split('_')
        leftAttName5 = temp[1]
        
        leftAttNames = [leftAttName1,
                           leftAttName2,
                           leftAttName3,
                           leftAttName4,
                           leftAttName5 ] 
        
        leftStartJoints = [self.sNames.handJoints['left_pinky1'],
                           self.sNames.handJoints['left_ring1'],
                           self.sNames.handJoints['left_middle1'],
                           self.sNames.handJoints['left_index1'],
                           self.sNames.handJoints['left_thumb1'] ] 
        
        leftEndJoints = [self.sNames.handJoints['left_pinky3'],
                           self.sNames.handJoints['left_ring3'],
                           self.sNames.handJoints['left_middle3'],
                           self.sNames.handJoints['left_index3'],
                           self.sNames.handJoints['left_thumb3'] ]
        
        # Right
        temp = self.sNames.handJoints['right_pinky1'].split('_')
        rightAttName1 = temp[1]
        temp = self.sNames.handJoints['right_ring1'].split('_')
        rightAttName2 = temp[1]
        temp = self.sNames.handJoints['right_middle1'].split('_')
        rightAttName3 = temp[1]
        temp = self.sNames.handJoints['right_index1'].split('_')
        rightAttName4 = temp[1]
        temp = self.sNames.handJoints['right_thumb1'].split('_')
        rightAttName5 = temp[1]
        
        rightAttNames = [rightAttName1,
                           rightAttName2,
                           rightAttName3,
                           rightAttName4,
                           rightAttName5 ] 
        
        rightStartJoints = [self.sNames.handJoints['right_pinky1'],
                           self.sNames.handJoints['right_ring1'],
                           self.sNames.handJoints['right_middle1'],
                           self.sNames.handJoints['right_index1'],
                           self.sNames.handJoints['right_thumb1'] ] 
        
        rightEndJoints = [self.sNames.handJoints['right_pinky3'],
                           self.sNames.handJoints['right_ring3'],
                           self.sNames.handJoints['right_middle3'],
                           self.sNames.handJoints['right_index3'],
                           self.sNames.handJoints['right_thumb3'] ]
        
        #--- Create the controllers and attributes
        # Left
        createFingersOrToesRig.createFingersOrToesRig( label = '%s_hand'%self.sNames.prefix['left'],  
                                                       control = self.sNames.controlNames['left_hand'],
                                                       attNames = leftAttNames,
                                                       startJnts = leftStartJoints,
                                                       endJnts = leftEndJoints,
                                                       curl = self.curl,
                                                       twist = self.twist,
                                                       spread = self.spread,
                                                       fkNormal = self.fkNormal,
                                                       radius = self.radius )
        
        # Right
        createFingersOrToesRig.createFingersOrToesRig( label = '%s_hand'%self.sNames.prefix['right'],  
                                                       control = self.sNames.controlNames['right_hand'],
                                                       attNames = rightAttNames,
                                                       startJnts = rightStartJoints,
                                                       endJnts = rightEndJoints,
                                                       curl = self.curl,
                                                       twist = self.twist,
                                                       spread = self.spread,
                                                       fkNormal = self.fkNormal,
                                                       radius = self.radius )
        
        #--- Setup All Spread SDK
        # Left side
        count = 0
        for jnt in leftStartJoints:
            if count == 0: # Pinky
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = 50 )
            if count == 1: # Ring
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = 30 )
            if count == 2: # middle
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -5 )
            if count == 3: # index
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -40 )
            if count == 4: # index
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['left_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -40 )
            count += 1

        # Right side
        count = 0
        for jnt in rightStartJoints:
            if count == 0: # Pinky
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = 50 )
            if count == 1: # Ring
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = 30 )
            if count == 2: # middle
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -5 )
            if count == 3: # index
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -40 )
            if count == 4: # index
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 0,
                                v = 0 )
                setDrivenKeyframe( jnt, 
                                cd=self.sNames.controlNames['right_hand'] + '.spread_all',
                                at= "rotate%s"%self.spread,
                                dv = 10,
                                v = -40 )
            count += 1

        
        #--- Setup left hand       
        # Lock the translations for the hand
        setAttr( '%s.translateX'%self.sNames.armJoints['left_wrist'], lock=True, keyable=False )
        setAttr( '%s.translateY'%self.sNames.armJoints['left_wrist'], lock=True, keyable=False )
        setAttr( '%s.translateZ'%self.sNames.armJoints['left_wrist'], lock=True, keyable=False )
        
        #--- Setup right hand    
        # Lock the translations for the hand
        setAttr('%s.translateX'%self.sNames.armJoints['right_wrist'], lock=True, keyable=False)
        setAttr('%s.translateY'%self.sNames.armJoints['right_wrist'], lock=True, keyable=False)
        setAttr('%s.translateZ'%self.sNames.armJoints['right_wrist'], lock=True, keyable=False)
        
        #--- Left / Right Hand Control Setup
        # Orient Constrain the follow joints to the Hand Controller
        orientConstraint(self.sNames.controlNames['right_hand'],self.r_wristFollowJnt,mo=True)
        orientConstraint(self.sNames.controlNames['left_hand'],self.l_wristFollowJnt,mo=True)

        # Point constrain Hand cnt buffer nodes to wrist follow joints
        pointConstraint( self.sNames.armJoints['left_wrist'],'%s_buffer' % self.sNames.controlNames['left_hand'], mo=True)
        pointConstraint( self.sNames.armJoints['right_wrist'],'%s_buffer' % self.sNames.controlNames['right_hand'], mo=True)
        
        # Parent buffer node to the main control
        parent('%s_buffer' % self.sNames.controlNames['left_hand'], self.sNames.controlNames['main'])
        parent('%s_buffer' % self.sNames.controlNames['right_hand'], self.sNames.controlNames['main'])
Пример #3
0
    def rigTongue(self,*args):
        """
        On hold.
        """
        # Draw ep curve along locators. 
        tng1 = xform('tongue_loc_1',q=True,ws=True,t=True)
        tng2 = xform('tongue_loc_2',q=True,ws=True,t=True)
        tng3 = xform('tongue_loc_3',q=True,ws=True,t=True)
        
        crv = curve( p=[tng1, tng2, tng3], d=2 )

        # Rebuild it with 8 cvs
        rebuildCurve( crv, s=8)
        
        # Draw joints on the curve
        #####Add joints to curves CV's
        x = 0 
        tngJoints = []
        while(x<11):
            cvPos = xform( 'curve1.cv[' + str(x) + ']', q=True, ws=True,t=True )
            tngJoints.append( joint( p = cvPos, radius =.2, 
                                     name = 'tongue_%s_%s'%(x,self.sNames.suffix['joint'] ) ))
            x = x + 1
        
        # Delete the curve
        delete(crv)
        
        # Duplicate and add to bind joints group        
        newJnts = duplicate(tngJoints[0])
        select(newJnts[0],replace=True,hi=True)
        newJnts = ls(sl=True)
        tngBindJoints = []
        for each in newJnts:
            newName = each + '_' + self.sNames.suffix['bind']
            rename(each,newName)
            tngBindJoints.append(newName)

        if objExists('bind_joints_grp'):
            parent(tngBindJoints[0],'bind_joints_grp')
        else:
            grp = group(em=True,n='bind_joints_grp')
            parent(tngBindJoints[0],'bind_joints_grp')
        
        # @todo - Add curl,twist,spread input
        # Create controllers on joints / attributes on jaw

        startJnt = []
        endJnt = []
        
        startJnt.append(tngJoints[0])
        endJnt.append(tngJoints[len(tngJoints)-1])
        
        createFingersOrToesRig.createFingersOrToesRig( label = 'Tongue',  
                                                       control = self.sNames.controlNames['jaw'],
                                                       attNames = '_',
                                                       startJnts = startJnt,
                                                       endJnts = endJnt,
                                                       curl = 'X',
                                                       twist = 'Z',
                                                       spread = 'Y',
                                                       fkNormal = (0,0,1),
                                                       radius = self.radius/3.0 )
                
        # Get parent of first joint, which is the new offset joint
        tmp = listRelatives(tngJoints[0],parent=True)
        tmp = listRelatives(tmp,parent=True)
        tmp = listRelatives(tmp,parent=True)
        prt = listRelatives(tmp,parent=True)
                
        # Parent tongue base to head
        parent(prt,self.sNames.headJoints['jaw'])
        
        # Enable translates on first controller
        setAttr('%s.translateX'%tngJoints[0],k=True,lock=False)
        setAttr('%s.translateY'%tngJoints[0],k=True,lock=False)
        setAttr('%s.translateZ'%tngJoints[0],k=True,lock=False)
        
        
        
        
        
        
Пример #4
0
    def createToesRig(self,*args):
        """
        Create fk attributes/controls on toe joints 
        on foot control.
        """
        if self.side == 1:
            # Left
            jntNames = self.sNames.feetJoints.keys()
            
            temp = self.sNames.feetJoints['left_pinkyToe1'].split('_')
            leftAttName1 = temp[1]
            temp = self.sNames.feetJoints['left_ringToe1'].split('_')
            leftAttName2 = temp[1]
            temp = self.sNames.feetJoints['left_middleToe1'].split('_')
            leftAttName3 = temp[1]
            temp = self.sNames.feetJoints['left_indexToe1'].split('_')
            leftAttName4 = temp[1]
            temp = self.sNames.feetJoints['left_bigToe1'].split('_')
            leftAttName5 = temp[1]
            
            leftAttNames = [leftAttName1,
                               leftAttName2,
                               leftAttName3,
                               leftAttName4,
                               leftAttName5 ] 
            
            leftStartJoints = [self.sNames.feetJoints['left_pinkyToe1'],
                               self.sNames.feetJoints['left_ringToe1'],
                               self.sNames.feetJoints['left_middleToe1'],
                               self.sNames.feetJoints['left_indexToe1'],
                               self.sNames.feetJoints['left_bigToe1'] ] 
            
            leftEndJoints = [self.sNames.feetJoints['left_pinkyToe3'],
                               self.sNames.feetJoints['left_ringToe3'],
                               self.sNames.feetJoints['left_middleToe3'],
                               self.sNames.feetJoints['left_indexToe3'],
                               self.sNames.feetJoints['left_bigToe3'] ]
            
            # Create the controllers @ todo - setup inputs/variables for curl, twist & spread vs constants
            createFingersOrToesRig.createFingersOrToesRig( label = '%s_foot'%self.sNames.prefix['left'],  
                                                           control = self.sNames.controlNames['left_foot'],
                                                           attNames = leftAttNames,
                                                           startJnts = leftStartJoints,
                                                           endJnts = leftEndJoints,
                                                           curl = 'Z',
                                                           twist = 'X',
                                                           spread = 'Y',
                                                           fkNormal = self.fkNormal,
                                                           radius = self.fkRadius/2.0 )
        
        if self.side == 2:
            # Right
            temp = self.sNames.feetJoints['right_pinkyToe1'].split('_')
            rightAttName1 = temp[1]
            temp = self.sNames.feetJoints['right_ringToe1'].split('_')
            rightAttName2 = temp[1]
            temp = self.sNames.feetJoints['right_middleToe1'].split('_')
            rightAttName3 = temp[1]
            temp = self.sNames.feetJoints['right_indexToe1'].split('_')
            rightAttName4 = temp[1]
            temp = self.sNames.feetJoints['right_bigToe1'].split('_')
            rightAttName5 = temp[1]
            
            rightAttNames = [rightAttName1,
                               rightAttName2,
                               rightAttName3,
                               rightAttName4,
                               rightAttName5 ] 
            
            rightStartJoints = [self.sNames.feetJoints['right_pinkyToe1'],
                               self.sNames.feetJoints['right_ringToe1'],
                               self.sNames.feetJoints['right_middleToe1'],
                               self.sNames.feetJoints['right_indexToe1'],
                               self.sNames.feetJoints['right_bigToe1'] ] 
            
            rightEndJoints = [self.sNames.feetJoints['right_pinkyToe3'],
                               self.sNames.feetJoints['right_ringToe3'],
                               self.sNames.feetJoints['right_middleToe3'],
                               self.sNames.feetJoints['right_indexToe3'],
                               self.sNames.feetJoints['right_bigToe3'] ]

            createFingersOrToesRig.createFingersOrToesRig( label = '%s_foot'%self.sNames.prefix['right'],  
                                                           control = self.sNames.controlNames['right_foot'],
                                                           attNames = rightAttNames,
                                                           startJnts = rightStartJoints,
                                                           endJnts = rightEndJoints,
                                                           curl = 'Z',
                                                           twist = 'X',
                                                           spread = 'Y',
                                                           fkNormal = self.fkNormal,
                                                           radius = self.fkRadius/2.0 )
        #--- Call: self.toeCntSetup()
        self.toeCntSetup()
Пример #5
0
    def rigTongue(self, *args):
        """
        On hold.
        """
        # Draw ep curve along locators.
        tng1 = xform('tongue_loc_1', q=True, ws=True, t=True)
        tng2 = xform('tongue_loc_2', q=True, ws=True, t=True)
        tng3 = xform('tongue_loc_3', q=True, ws=True, t=True)

        crv = curve(p=[tng1, tng2, tng3], d=2)

        # Rebuild it with 8 cvs
        rebuildCurve(crv, s=8)

        # Draw joints on the curve
        #####Add joints to curves CV's
        x = 0
        tngJoints = []
        while (x < 11):
            cvPos = xform('curve1.cv[' + str(x) + ']', q=True, ws=True, t=True)
            tngJoints.append(
                joint(p=cvPos,
                      radius=.2,
                      name='tongue_%s_%s' % (x, self.sNames.suffix['joint'])))
            x = x + 1

        # Delete the curve
        delete(crv)

        # Duplicate and add to bind joints group
        newJnts = duplicate(tngJoints[0])
        select(newJnts[0], replace=True, hi=True)
        newJnts = ls(sl=True)
        tngBindJoints = []
        for each in newJnts:
            newName = each + '_' + self.sNames.suffix['bind']
            rename(each, newName)
            tngBindJoints.append(newName)

        if objExists('bind_joints_grp'):
            parent(tngBindJoints[0], 'bind_joints_grp')
        else:
            grp = group(em=True, n='bind_joints_grp')
            parent(tngBindJoints[0], 'bind_joints_grp')

        # @todo - Add curl,twist,spread input
        # Create controllers on joints / attributes on jaw

        startJnt = []
        endJnt = []

        startJnt.append(tngJoints[0])
        endJnt.append(tngJoints[len(tngJoints) - 1])

        createFingersOrToesRig.createFingersOrToesRig(
            label='Tongue',
            control=self.sNames.controlNames['jaw'],
            attNames='_',
            startJnts=startJnt,
            endJnts=endJnt,
            curl='X',
            twist='Z',
            spread='Y',
            fkNormal=(0, 0, 1),
            radius=self.radius / 3.0)

        # Get parent of first joint, which is the new offset joint
        tmp = listRelatives(tngJoints[0], parent=True)
        tmp = listRelatives(tmp, parent=True)
        tmp = listRelatives(tmp, parent=True)
        prt = listRelatives(tmp, parent=True)

        # Parent tongue base to head
        parent(prt, self.sNames.headJoints['jaw'])

        # Enable translates on first controller
        setAttr('%s.translateX' % tngJoints[0], k=True, lock=False)
        setAttr('%s.translateY' % tngJoints[0], k=True, lock=False)
        setAttr('%s.translateZ' % tngJoints[0], k=True, lock=False)
Пример #6
0
    def create(self, *args):
        """
        Given input, create the hand rig.
        """
        # Names derived from keys in standard joint names dictionary.

        # --- Setup orient switch on hand controls
        self.orientConstraintOnHands()

        # --- Setup the palm cup / bend on the hand controls.
        self.palmSetup()

        # Left
        jntNames = self.sNames.handJoints.keys()

        temp = self.sNames.handJoints["left_pinky1"].split("_")
        leftAttName1 = temp[1]
        temp = self.sNames.handJoints["left_ring1"].split("_")
        leftAttName2 = temp[1]
        temp = self.sNames.handJoints["left_middle1"].split("_")
        leftAttName3 = temp[1]
        temp = self.sNames.handJoints["left_index1"].split("_")
        leftAttName4 = temp[1]
        temp = self.sNames.handJoints["left_thumb1"].split("_")
        leftAttName5 = temp[1]

        leftAttNames = [leftAttName1, leftAttName2, leftAttName3, leftAttName4, leftAttName5]

        leftStartJoints = [
            self.sNames.handJoints["left_pinky1"],
            self.sNames.handJoints["left_ring1"],
            self.sNames.handJoints["left_middle1"],
            self.sNames.handJoints["left_index1"],
            self.sNames.handJoints["left_thumb1"],
        ]

        leftEndJoints = [
            self.sNames.handJoints["left_pinky3"],
            self.sNames.handJoints["left_ring3"],
            self.sNames.handJoints["left_middle3"],
            self.sNames.handJoints["left_index3"],
            self.sNames.handJoints["left_thumb3"],
        ]

        # Right
        temp = self.sNames.handJoints["right_pinky1"].split("_")
        rightAttName1 = temp[1]
        temp = self.sNames.handJoints["right_ring1"].split("_")
        rightAttName2 = temp[1]
        temp = self.sNames.handJoints["right_middle1"].split("_")
        rightAttName3 = temp[1]
        temp = self.sNames.handJoints["right_index1"].split("_")
        rightAttName4 = temp[1]
        temp = self.sNames.handJoints["right_thumb1"].split("_")
        rightAttName5 = temp[1]

        rightAttNames = [rightAttName1, rightAttName2, rightAttName3, rightAttName4, rightAttName5]

        rightStartJoints = [
            self.sNames.handJoints["right_pinky1"],
            self.sNames.handJoints["right_ring1"],
            self.sNames.handJoints["right_middle1"],
            self.sNames.handJoints["right_index1"],
            self.sNames.handJoints["right_thumb1"],
        ]

        rightEndJoints = [
            self.sNames.handJoints["right_pinky3"],
            self.sNames.handJoints["right_ring3"],
            self.sNames.handJoints["right_middle3"],
            self.sNames.handJoints["right_index3"],
            self.sNames.handJoints["right_thumb3"],
        ]

        # --- Create the controllers and attributes
        # Left
        createFingersOrToesRig.createFingersOrToesRig(
            label="%s_hand" % self.sNames.prefix["left"],
            control=self.sNames.controlNames["left_hand"],
            attNames=leftAttNames,
            startJnts=leftStartJoints,
            endJnts=leftEndJoints,
            curl=self.curl,
            twist=self.twist,
            spread=self.spread,
            fkNormal=self.fkNormal,
            radius=self.radius,
        )

        # Right
        createFingersOrToesRig.createFingersOrToesRig(
            label="%s_hand" % self.sNames.prefix["right"],
            control=self.sNames.controlNames["right_hand"],
            attNames=rightAttNames,
            startJnts=rightStartJoints,
            endJnts=rightEndJoints,
            curl=self.curl,
            twist=self.twist,
            spread=self.spread,
            fkNormal=self.fkNormal,
            radius=self.radius,
        )

        # --- Setup All Spread SDK
        # Left side
        count = 0
        for jnt in leftStartJoints:
            if count == 0:  # Pinky
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=50,
                )
            if count == 1:  # Ring
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=30,
                )
            if count == 2:  # middle
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-5,
                )
            if count == 3:  # index
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-40,
                )
            if count == 4:  # index
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["left_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-40,
                )
            count += 1

        # Right side
        count = 0
        for jnt in rightStartJoints:
            if count == 0:  # Pinky
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=50,
                )
            if count == 1:  # Ring
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=30,
                )
            if count == 2:  # middle
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-5,
                )
            if count == 3:  # index
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-40,
                )
            if count == 4:  # index
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=0,
                    v=0,
                )
                setDrivenKeyframe(
                    jnt,
                    cd=self.sNames.controlNames["right_hand"] + ".spread_all",
                    at="rotate%s" % self.spread,
                    dv=10,
                    v=-40,
                )
            count += 1

        # --- Setup left hand
        # Lock the translations for the hand
        setAttr("%s.translateX" % self.sNames.armJoints["left_wrist"], lock=True, keyable=False)
        setAttr("%s.translateY" % self.sNames.armJoints["left_wrist"], lock=True, keyable=False)
        setAttr("%s.translateZ" % self.sNames.armJoints["left_wrist"], lock=True, keyable=False)

        # --- Setup right hand
        # Lock the translations for the hand
        setAttr("%s.translateX" % self.sNames.armJoints["right_wrist"], lock=True, keyable=False)
        setAttr("%s.translateY" % self.sNames.armJoints["right_wrist"], lock=True, keyable=False)
        setAttr("%s.translateZ" % self.sNames.armJoints["right_wrist"], lock=True, keyable=False)

        # --- Left / Right Hand Control Setup
        # Orient Constrain the follow joints to the Hand Controller
        orientConstraint(self.sNames.controlNames["right_hand"], self.r_wristFollowJnt, mo=True)
        orientConstraint(self.sNames.controlNames["left_hand"], self.l_wristFollowJnt, mo=True)

        # Point constrain Hand cnt buffer nodes to wrist follow joints
        pointConstraint(
            self.sNames.armJoints["left_wrist"], "%s_buffer" % self.sNames.controlNames["left_hand"], mo=True
        )
        pointConstraint(
            self.sNames.armJoints["right_wrist"], "%s_buffer" % self.sNames.controlNames["right_hand"], mo=True
        )

        # Parent buffer node to the main control
        parent("%s_buffer" % self.sNames.controlNames["left_hand"], self.sNames.controlNames["main"])
        parent("%s_buffer" % self.sNames.controlNames["right_hand"], self.sNames.controlNames["main"])