diff options
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 1e551b64693..857a461e26e 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4560,20 +4560,7 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) } else if(!ok && nu->pntsv==1) { /* which b-point? */ - if(bp== nu->bp) { /* first */ - bp->f1= 0; - newbp = - (BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb3"); - ED_curve_bpcpy(editnurb, newbp+1, bp, nu->pntsu); - *newbp= *bp; - newbp->f1|= SELECT; - cu->lastsel= newbp; - MEM_freeN(nu->bp); - nu->bp= newbp; - bp= newbp + 1; - ok= 1; - } - else if(bp== (nu->bp+nu->pntsu-1)) { /* last */ + if(bp== (nu->bp+nu->pntsu-1)) { /* last */ bp->f1= 0; newbp = (BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb4"); @@ -4587,6 +4574,19 @@ static int addvert_Nurb(bContext *C, short mode, float location[3]) bp= newbp - 1; ok= 1; } + else if(bp== nu->bp) { /* first */ + bp->f1= 0; + newbp = + (BPoint*)MEM_callocN((nu->pntsu+1) * sizeof(BPoint), "addvert_Nurb3"); + ED_curve_bpcpy(editnurb, newbp+1, bp, nu->pntsu); + *newbp= *bp; + newbp->f1|= SELECT; + cu->lastsel= newbp; + MEM_freeN(nu->bp); + nu->bp= newbp; + bp= newbp + 1; + ok= 1; + } else if(mode!='e') { bp->f1= 0; newbp= (BPoint*)MEM_callocN(sizeof(BPoint), "addvert_Nurb5"); |