fix for [18069] open nurbs curve snaps end to centerpoint
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Dec 2008 11:42:26 +0000 (11:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Dec 2008 11:42:26 +0000 (11:42 +0000)
made nurbs surface curves use the same number of points as nurbs curves.

source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/displist.c

index 1a671dfe771ec73d5ad2f473317280148ae1a421..7fa4f406c7b2bc2390c37f037306fe3c951f844e 100644 (file)
@@ -833,7 +833,6 @@ void makeNurbcurve(Nurb *nu, float *coord_array, float *tilt_array, float *radiu
        sum= (float *)MEM_callocN(sizeof(float)*len, "makeNurbcurve1");
        
        resolu= (resolu*SEGMENTSU(nu));
-       if((nu->flagu & CU_CYCLIC)==0) resolu++;
        
        if(resolu==0) {
                MEM_freeN(sum);
@@ -1685,7 +1684,6 @@ void makeBevelList(Object *ob)
                        else if((nu->type & 7)==CU_NURBS) {
                                if(nu->pntsv==1) {
                                        len= (resolu*SEGMENTSU(nu));
-                                       if((nu->flagu & CU_CYCLIC)==0) len++;
                                        
                                        bl= MEM_callocN(sizeof(BevList)+len*sizeof(BevPoint), "makeBevelList3");
                                        BLI_addtail(&(cu->bev), bl);
index 35097c053581d546eec72e4bec44781e697f5477..7716d71225eb9d76889b7bf785ed68fae63e7348 100644 (file)
@@ -887,7 +887,6 @@ static void curve_to_displist(Curve *cu, ListBase *nubase, ListBase *dispbase)
                        }
                        else if((nu->type & 7)==CU_NURBS) {
                                len= (resolu*SEGMENTSU(nu));
-                               if((nu->flagu & CU_CYCLIC)==0) len++;
                                
                                dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
                                dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");
@@ -1381,7 +1380,7 @@ void makeDispListSurf(Object *ob, ListBase *dispbase, int forRender)
        for (nu=nubase->first; nu; nu=nu->next) {
                if(forRender || nu->hide==0) {
                        if(nu->pntsv==1) {
-                               len= nu->pntsu*nu->resolu;
+                               len= SEGMENTSU(nu)*nu->resolu;
                                
                                dl= MEM_callocN(sizeof(DispList), "makeDispListsurf");
                                dl->verts= MEM_callocN(len*3*sizeof(float), "dlverts");