curves.py 文件源码

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

项目:mayakit 作者: danbradham 项目源码 文件源码
def to_curve_fn(curve):

    shape = None
    if cmds.nodeType(curve, 'nurbsCurve'):
        shape = curve
    else:
        child = cmds.listRelatives(curve, shapes=True, noIntermediate=True)
        if child:
            shape = child[0]
        else:
            cmds.warning('Not a proper nurbsCurve: {}'.format(curve))
            raise Exception('Not a proper nurbsCurve: {}'.format(curve))

    sel = om.MSelectionList()
    sel.add(shape)
    dep = sel.getDagPath(0)
    fn = om.MFnNurbsCurve(dep)
    return fn
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号