diff options
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 30cb4016061..fab9669d55f 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -591,8 +591,8 @@ static void makecyclicknots(float *knots, short pnts, short order) } -/* type - 0: uniform, 1: endpoints, 2: bezier, note, cyclic nurbs are always uniform */ -void makeknots(Nurb *nu, short uv, short type) + +void makeknots(Nurb *nu, short uv) { if( (nu->type & 7)==CU_NURBS ) { if(uv == 1) { @@ -603,7 +603,7 @@ void makeknots(Nurb *nu, short uv, short type) calcknots(nu->knotsu, nu->pntsu, nu->orderu, 0); /* cyclic should be uniform */ makecyclicknots(nu->knotsu, nu->pntsu, nu->orderu); } else { - calcknots(nu->knotsu, nu->pntsu, nu->orderu, type); + calcknots(nu->knotsu, nu->pntsu, nu->orderu, nu->flagu>>1); } } else nu->knotsu= NULL; @@ -616,7 +616,7 @@ void makeknots(Nurb *nu, short uv, short type) calcknots(nu->knotsv, nu->pntsv, nu->orderv, 0); /* cyclic should be uniform */ makecyclicknots(nu->knotsv, nu->pntsv, nu->orderv); } else { - calcknots(nu->knotsv, nu->pntsv, nu->orderv, type); + calcknots(nu->knotsv, nu->pntsv, nu->orderv, nu->flagv>>1); } } else nu->knotsv= NULL; @@ -1572,8 +1572,8 @@ void makeBevelList(Object *ob) while(nu) { /* check if we will calculate tilt data */ - do_tilt = ((nu->type & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1; - do_radius = (do_tilt || cu->bevobj) ? 1 : 0; /* normal display uses the radius, better just to calculate them */ + do_tilt = CU_DO_TILT(cu, nu); + do_radius = CU_DO_RADIUS(cu, nu); /* normal display uses the radius, better just to calculate them */ /* check we are a single point? also check we are not a surface and that the orderu is sane, * enforced in the UI but can go wrong possibly */ @@ -2370,7 +2370,7 @@ void sethandlesNurb(ListBase *editnurb, short code) if(code==1 || code==2) { nu= editnurb->first; while(nu) { - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { @@ -2400,7 +2400,7 @@ void sethandlesNurb(ListBase *editnurb, short code) } else { /* Toggle */ while(nu) { - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { @@ -2417,7 +2417,7 @@ void sethandlesNurb(ListBase *editnurb, short code) } nu= editnurb->first; while(nu) { - if( (nu->type & 7)==1) { + if( (nu->type & 7)==CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { |