Code: Select all
from vtool.maya_lib import space
from vtool.maya_lib import attr
space.create_multi_follow(['CNT_SUB_GROUND_2_C','CNT_SUB_HEAD_2_C'], 'xform_CNT_EYES_1_C', 'CNT_EYES_1_C', attribute_name = 'headFollow')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.translateX', 'xform_local_CNT_EYES_1_C.translateX')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.translateY', 'xform_local_CNT_EYES_1_C.translateY')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.translateZ', 'xform_local_CNT_EYES_1_C.translateZ')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.rotateX', 'xform_local_CNT_EYES_1_C.rotateX')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.rotateY', 'xform_local_CNT_EYES_1_C.rotateY')
cmds.connectAttr('follow_xform_CNT_EYES_1_C.rotateZ', 'xform_local_CNT_EYES_1_C.rotateZ')
cmds.parent('controls_eyes_1_C', 'CNT_SUB_HEAD_2_C')