zbw_curveTools.py 文件源码

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

项目:zTools 作者: zethwillie 项目源码 文件源码
def reparameter(*args):
    """
    reparameterizes curves to be from 0-1
    Args:
    Returns:
    """
    sel = cmds.ls(sl=True, exactType = "transform")

    check = False
    newCrvs = []

    if sel:
        for x in sel:
            check = rig.isType(x, "nurbsCurve")
            if check:
                crv = x
                newCrv = cmds.rebuildCurve(crv, constructionHistory=False, rebuildType = 0, keepControlPoints=True,  keepRange = 0, replaceOriginal=True, name = "{0}_RB".format(crv))[0]

            # reconnect parents and children of orig curve

            else:
                cmds.warning("{0} is not a nurbsCurve object. Skipping!".format(x))

    cmds.select(sel, r=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号