Untitled
unknown
plain_text
3 years ago
4.6 kB
5
Indexable
def FingTweakDRV(): srName = ['R_PinkyKnucle_Drv_Sr', 'R_MidKnucle_Drv_Sr', 'R_IndexKnucle_Drv_Sr', 'R_PinkyCrease_Drv_Sr', 'R_MidCrease_Drv_Sr', 'R_IndexCrease_Drv_Sr'] DrvCtrl = ['R_ShirtKnuckleTweekA_Main_Drv', 'R_ShirtKnuckleTweekB_Main_Drv', 'R_ShirtKnuckleTweekC_Main_Drv', 'R_ShirtKnuckleTweekF_Main_Drv', 'R_ShirtKnuckleTweekE_Main_Drv', 'R_ShirtKnuckleTweekD_Main_Drv'] DrvJnt = ['R_Pinky_A_Bind_Jnt', 'R_Middle_A_Bind_Jnt', 'R_Index_A_Bind_Jnt', 'R_Pinky_A_Bind_Jnt', 'R_Middle_A_Bind_Jnt', 'R_Index_A_Bind_Jnt'] zip_object = zip(srName, DrvCtrl, DrvJnt) for sr, dc, dj in zip_object: mc.createNode('setRange', n=sr) mc.connectAttr(dj + '.rotateX', sr + '.valueX') mc.connectAttr(dj + '.rotateX', sr + '.valueY') mc.connectAttr(dj + '.rotateX', sr + '.valueZ') mc.connectAttr(sr + '.outValueX', dc + '.translateX') mc.connectAttr(sr + '.outValueY', dc + '.translateY') mc.connectAttr(sr + '.outValueZ', dc + '.translateZ') RotVal = 30 SrVal = [0,-0.25,0.15] # R_PinkyKnucle_Drv_Sr Values mc.setAttr(srName[0] + '.oldMaxX', RotVal) mc.setAttr(srName[0] + '.oldMaxY', RotVal) mc.setAttr(srName[0] + '.oldMaxZ', RotVal) mc.setAttr(srName[0] + ".maxX", SrVal[0]) mc.setAttr(srName[0] + ".maxY", SrVal[1]) mc.setAttr(srName[0] + ".maxZ", SrVal[2]) # R_MidKnucle_Drv_Sr Values mc.setAttr(srName[1] + '.oldMaxX', 30) mc.setAttr(srName[1] + '.oldMaxY', 30) mc.setAttr(srName[1] + '.oldMaxZ', 30) mc.setAttr(srName[1] + ".maxX", 0) mc.setAttr(srName[1] + ".maxY", -0.25) mc.setAttr(srName[1] + ".maxZ", 0) # R_IndexKnucle_Drv_Sr mc.setAttr(srName[2] + '.oldMaxX', 30) mc.setAttr(srName[2] + '.oldMaxY', 30) mc.setAttr(srName[2] + '.oldMaxZ', 30) mc.setAttr(srName[2] + ".maxX", 0) mc.setAttr(srName[2] + ".maxY", -0.25) mc.setAttr(srName[2] + ".maxZ", -0.25) # R_PinkyCrease_Drv_Sr Values mc.setAttr(srName[3] + '.oldMaxX', 50) mc.setAttr(srName[3] + '.oldMinY', -30) mc.setAttr(srName[3] + '.oldMinZ', -30) mc.setAttr(srName[3] + ".maxX", 0.25) mc.setAttr(srName[3] + ".minY", 0.15) mc.setAttr(srName[3] + ".minZ", 0.15) # R_MidCrease_Drv_Sr Values mc.setAttr(srName[4] + '.oldMaxX', 50) mc.setAttr(srName[4] + '.oldMinY', -30) mc.setAttr(srName[4] + '.oldMinZ', -30) mc.setAttr(srName[4] + ".maxX", 0.25) mc.setAttr(srName[4] + ".minY", 0.15) mc.setAttr(srName[4] + ".minZ", 0) # R_IndexCrease_Drv_Sr mc.setAttr(srName[5] + '.oldMaxX', 50) mc.setAttr(srName[5] + '.oldMinY', -30) mc.setAttr(srName[5] + '.oldMinZ', -30) mc.setAttr(srName[5] + ".maxX", 0.25) mc.setAttr(srName[5] + ".minY", 0.15) mc.setAttr(srName[5] + ".minZ", -0.15) def FingTweakCFX(): srName = ['R_PinkyKnucle_Cfx_sr', 'R_IndexKnucle_Cfx_sr', 'R_PinkyCrease_Cfx_sr', 'R_IndexCrease_Cfx_sr'] DrvCtrl = ['R_ShirtKnuckleTweekA_Main_Cfx', 'R_ShirtKnuckleTweekC_Main_Cfx', 'R_ShirtKnuckleTweekF_Main_Cfx', 'R_ShirtKnuckleTweekD_Main_Cfx'] DrvJnt = ['R_Pinky_A_Bind_Jnt', 'R_Index_A_Bind_Jnt', 'R_Pinky_A_Bind_Jnt', 'R_Index_A_Bind_Jnt'] zip_object = zip(srName, DrvCtrl, DrvJnt) for sr, dc, dj in zip_object: mc.createNode('setRange', n=sr) mc.connectAttr(dj + '.rotateZ', sr + '.valueZ') mc.connectAttr(dj + '.rotateZ', sr + '.valueY') mc.connectAttr(sr + '.outValueZ', dc + '.translateZ') mc.connectAttr(sr + '.outValueY', dc + '.translateY') # R_PinkyKnucle_Cfx_sr Values mc.setAttr(srName[0] + '.oldMaxZ', 30) mc.setAttr(srName[0] + ".maxZ", 0.2) mc.setAttr(srName[0] + '.oldMaxY', 30) mc.setAttr(srName[0] + ".maxY", 0) # R_PinkyCrease_Cfx_sr Values mc.setAttr(srName[2] + '.oldMaxZ', 30) mc.setAttr(srName[2] + ".maxZ", 0.2) mc.setAttr(srName[2] + '.oldMaxY', 30) mc.setAttr(srName[2] + ".maxY", 0) # R_IndexKnucle_Cfx_sr mc.setAttr(srName[1] + '.oldMinZ', -30) mc.setAttr(srName[1] + ".minZ", -0.5) mc.setAttr(srName[1] + '.oldMinY', -30) mc.setAttr(srName[1] + ".minY", -0.25) # R_IndexCrease_Cfx_sr mc.setAttr(srName[3] + '.oldMinZ', -30) mc.setAttr(srName[3] + ".minZ", -0.15) mc.setAttr(srName[3] + '.oldMinY', -30) mc.setAttr(srName[3] + ".minY", -0.25) FingTweakDRV() FingTweakCFX()
Editor is loading...