zbw_rig.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def groupOrient(target='none',orig='none', group="GRP"):
    """
    groups the second object and snaps the group to the second (point and orient). The group arg is to name the suffix you want the group to have (default is '_GRP')
    Arguments: target (to be constrained to), orig (obj to move), group (suffix for group)
    """
    if (target == "none"):
        sel = getTwoSelection()
        target = sel[0]
        orig = sel[1]

    cmds.select(orig)
    grpName = "%s_%s"%(orig,group)
    cmds.group(name=grpName)
    pc = cmds.pointConstraint(target, grpName)
    oc = cmds.orientConstraint(target, grpName)
    cmds.delete(pc)
    cmds.delete(oc)
    cmds.select(clear=True)

    return(grpName)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号