zbw_rigTools.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def center_locator(*args):
    """creates a center loc on the avg position"""

    sel = cmds.ls(sl=True, fl=True)
    if sel:
        ps = []
        for vtx in sel:
            ps.append(cmds.xform(vtx, q=True, ws=True, rp=True))

        # this is cool!
        center = [sum(y)/len(y) for y in zip(*ps)]

        loc = cmds.spaceLocator(name="center_locator")
        cmds.xform(loc, ws=True, t=center)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号