def editCurve(parent, points, degree=1, form=kOpen):
    assert isinstance(parent, DagNode), 'parent must be of type cmdx.DagNode'
    degree = min(3, max(1, degree))
    cvs = om1.MPointArray()
    curveFn = om1.MFnNurbsCurve()
    for point in points:
        cvs.append(om1.MPoint(*point))
    mobj = curveFn.createWithEditPoints(cvs, degree, form, False, False, True, _encode1(parent.path()))
    mod = om1.MDagModifier()
    mod.renameNode(mobj, (parent.name(namespace=True) + 'Shape'))
    mod.doIt()

    def undo():
        mod.deleteNode(mobj)
        mod.doIt()

    def redo():
        mod.undoIt()
    commit(undo, redo)
    shapeFn = om1.MFnDagNode(mobj)
    return encode(shapeFn.fullPathName())
def editCurve(parent, points, degree=1, form=kOpen):
    assert isinstance(parent, DagNode), 'parent must be of type cmdx.DagNode'
    degree = min(3, max(1, degree))
    cvs = om1.MPointArray()
    curveFn = om1.MFnNurbsCurve()
    for point in points:
        cvs.append(om1.MPoint(*point))
    mobj = curveFn.createWithEditPoints(cvs, degree, form, False, False, True, _encode1(parent.path()))
    mod = om1.MDagModifier()
    mod.renameNode(mobj, (parent.name(namespace=True) + 'Shape'))
    mod.doIt()

    def undo():
        mod.deleteNode(mobj)
        mod.doIt()

    def redo():
        mod.undoIt()
    commit(undo, redo)
    shapeFn = om1.MFnDagNode(mobj)
    return encode(shapeFn.fullPathName())