zbw_spaceMatch.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def switchMatchSpace(index, *args):
    #get the obj and attr
    obj = cmds.textFieldGrp(widgets["objTFG"], q=True, tx=True)
    #print("switchMatch obj val :%s"%obj)
    attr = "%s.follow"%obj


    #get the space value that was selected? why?

    #get the existing ws xform values of obj
    ws1Pos = cmds.xform(obj, q=True, ws=True, t=True)
    ws1Rot = cmds.xform(obj, q=True, ws=True, ro=True)

    #(maybe also key it a frame before at previous value?)
    #set and key the switch
    cmds.setAttr("%s.follow"%obj, index)

    #-------------setKey here?
    #set the old ws xform of obj
    ws2Pos = cmds.xform(obj, ws=True, t=ws1Pos)
    ws2Rot = cmds.xform(obj, ws=True, ro=ws1Rot)
    print("changed space of %s to index %s"%(obj,index))

    #set and key the space

    pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号