SEToolsPlugin.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:SETools 作者: dtzxporter 项目源码 文件源码
def WeaponBinder():
    # Call of Duty specific
    for x in xrange(0, len(GUN_BASE_TAGS)):
        try:
            # Select both tags and parent them
            cmds.select(GUN_BASE_TAGS[x], replace = True)
            cmds.select(VIEW_HAND_TAGS[x], toggle = True)
            # Connect
            cmds.connectJoint(connectMode = True)
            # Parent
            mel.eval("parent " + GUN_BASE_TAGS[x] + " " + VIEW_HAND_TAGS[x])
            # Reset the positions of both bones
            cmds.setAttr(GUN_BASE_TAGS[x] + ".t", 0, 0, 0)
            cmds.setAttr(GUN_BASE_TAGS[x] + ".jo", 0, 0, 0)
            cmds.setAttr(GUN_BASE_TAGS[x] + ".rotate", 0, 0, 0)
            # Reset the rotation of the parent tag
            cmds.setAttr(VIEW_HAND_TAGS[x] + ".jo", 0, 0, 0)
            cmds.setAttr(VIEW_HAND_TAGS[x] + ".rotate", 0, 0, 0)
            # Remove
            cmds.select(clear = True)
        except:
            pass


# Place a notetrack
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号