zbw_splineIk.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def orientJointChain(*args):
#---------------- this doens't actually work. dot doesn't represent the relationship btw orients
    cmds.joint(jnts[0], e=True, oj="xyz", secondaryAxisOrient="ydown", ch=True, zso=True)

    #print cmds.getAttr("{}.jointOrient".format(cmds.ls(sl=True)[0]))
    for y in range(1, len(jnts)):
        v1 = cmds.getAttr("{}.jointOrient".format(jnts[0]))[0]
        v2 = cmds.getAttr("{}.jointOrient".format(jnts[y]))[0]

        dotN = mth.dotN(v1, v2) # figure out how to reverse joint orientation
        if dotN < 0:
            print jnts[y], "dot neg"
            # reorient (inverse secondary axis)

    # for jnt in jnts:
    #   print mth.dotN(cmds.getAttr("{}.jointOrient".format(jnts[0]))[0], cmds.getAttr("{}.jointOrient".format(jnt))[0])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号