Exemplo n.º 1
0
    def pvt_add_spreadBase_drivers(self, hand):
        n = self.cn + '_ctrl_' + hand
        gu.add_attribute(n,
                         'spreadBaseAll',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)

        # Each finger gets a scaled spread effect
        self.pvt_add_finger_driven_keys_spreadBase(n, hand, 'Thumb', 1.0)
        self.pvt_add_finger_driven_keys_spreadBase(n, hand, 'Index', 0.8)
        self.pvt_add_finger_driven_keys_spreadBase(n, hand, 'Middle', 0.4)
        self.pvt_add_finger_driven_keys_spreadBase(n, hand, 'Ring', -0.4)
        self.pvt_add_finger_driven_keys_spreadBase(n, hand, 'Pinky', -0.8)
Exemplo n.º 2
0
    def pvt_add_bendMid_drivers(self, hand):
        n = self.cn + '_ctrl_' + hand
        gu.add_attribute(n,
                         'bendMidThumb',
                         type='float',
                         min=0,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'bendMidIndex',
                         type='float',
                         min=0,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'bendMidMiddle',
                         type='float',
                         min=0,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'bendMidRing',
                         type='float',
                         min=0,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'bendMidPinky',
                         type='float',
                         min=0,
                         max=100,
                         default=0,
                         keyable=True)

        self.pvt_add_finger_driven_keys_bendMid(n, hand, 'Thumb')
        self.pvt_add_finger_driven_keys_bendMid(n, hand, 'Index')
        self.pvt_add_finger_driven_keys_bendMid(n, hand, 'Middle')
        self.pvt_add_finger_driven_keys_bendMid(n, hand, 'Ring')
        self.pvt_add_finger_driven_keys_bendMid(n, hand, 'Pinky')
Exemplo n.º 3
0
    def pvt_add_curl_drivers(self, hand):
        n = self.cn + '_ctrl_' + hand
        gu.add_attribute(n,
                         'curlThumb',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'curlIndex',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'curlMiddle',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'curlRing',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'curlPinky',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)
        gu.add_attribute(n,
                         'curlAll',
                         type='float',
                         min=-100,
                         max=100,
                         default=0,
                         keyable=True)

        self.pvt_add_finger_driven_keys_curl(n, hand, 'Thumb')
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Index')
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Middle')
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Ring')
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Pinky')

        # Now set curl all drivers
        all = True
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Thumb', all)
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Index', all)
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Middle', all)
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Ring', all)
        self.pvt_add_finger_driven_keys_curl(n, hand, 'Pinky', all)
Exemplo n.º 4
0
    def create_footRoll_driven_keys(self, **p):
        cn = self.cn
        # Custom attributes and driven keys
        n = cn + '_ctrl_RightFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'midRoll',
                         type='float',
                         min=0,
                         max=50,
                         default=0,
                         keyable=True)
        nC = cn + '_RightFoot_FRoll_LocC.rotateX'
        gu.set_driven_key(n + '.midRoll', nC, 0, 0)
        gu.set_driven_key(n + '.midRoll', nC, 50, 50)

        n = cn + '_ctrl_LeftFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'midRoll',
                         type='float',
                         min=0,
                         max=50,
                         default=0,
                         keyable=True)
        nC = cn + '_LeftFoot_FRoll_LocC.rotateX'
        gu.set_driven_key(n + '.midRoll', nC, 0, 0)
        gu.set_driven_key(n + '.midRoll', nC, 50, 50)

        n = cn + '_ctrl_RightFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'baseRoll',
                         type='float',
                         min=-90,
                         max=90,
                         default=0,
                         keyable=True)
        nC = cn + '_RightFoot_FRoll_LocA.rotateX'
        gu.set_driven_key(n + '.baseRoll', nC, -90, -90)
        gu.set_driven_key(n + '.baseRoll', nC, 90, 90)

        n = cn + '_ctrl_LeftFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'baseRoll',
                         type='float',
                         min=-90,
                         max=90,
                         default=0,
                         keyable=True)
        nC = cn + '_LeftFoot_FRoll_LocA.rotateX'
        gu.set_driven_key(n + '.baseRoll', nC, -90, -90)
        gu.set_driven_key(n + '.baseRoll', nC, 90, 90)

        n = cn + '_ctrl_RightFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'baseRotate',
                         type='float',
                         min=-45,
                         max=45,
                         default=0,
                         keyable=True)
        nC = cn + '_RightFoot_FRoll_LocA.rotateY'
        gu.set_driven_key(n + '.baseRotate', nC, -45, -45)
        gu.set_driven_key(n + '.baseRotate', nC, 45, 45)

        n = cn + '_ctrl_LeftFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'baseRotate',
                         type='float',
                         min=-45,
                         max=45,
                         default=0,
                         keyable=True)
        nC = cn + '_LeftFoot_FRoll_LocA.rotateY'
        gu.set_driven_key(n + '.baseRotate', nC, -45, -45)
        gu.set_driven_key(n + '.baseRotate', nC, 45, 45)

        n = cn + '_ctrl_RightFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'toeRaise',
                         type='float',
                         min=0,
                         max=120,
                         default=0,
                         keyable=True)
        nC = cn + '_RightFoot_FRoll_LocB.rotateX'
        gu.set_driven_key(n + '.toeRaise', nC, 0, 0)
        gu.set_driven_key(n + '.toeRaise', nC, 120, 120)

        n = cn + '_ctrl_LeftFoot_FRoll_LocA'
        gu.add_attribute(n,
                         'toeRaise',
                         type='float',
                         min=0,
                         max=120,
                         default=0,
                         keyable=True)
        nC = cn + '_LeftFoot_FRoll_LocB.rotateX'
        gu.set_driven_key(n + '.toeRaise', nC, 0, 0)
        gu.set_driven_key(n + '.toeRaise', nC, 120, 120)