zbw_rig.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def addGroupBelow(*args):
############----------fix lots of stuff here, but basic idea works  
    sel = cmds.ls(sl=True)

    for obj in sel:
        pos = cmds.xform(obj, ws=True, q=True, rp=True)
        rot = cmds.xform(obj, ws=True, q=True, ro=True)

        children = cmds.listRelatives(obj, children=True)

        grp = cmds.group(em=True, name=obj.replace("Auto", "Manual"))

        cmds.xform(grp, ws=True, t=pos)
        cmds.xform(grp, ws=True, ro=rot)

        cmds.parent(grp, obj)
        for child in children:
            cmds.parent(child, grp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号