Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Sat, 14 Oct 2017 06:58:29 +0000 (17:58 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 14 Oct 2017 06:58:29 +0000 (17:58 +1100)
source/blender/blenkernel/intern/curve.c
source/blender/editors/curve/editcurve_paint.c

index 5fbaae7212b7994f8f93ee195ef12d250826d2ec..a93bda215a086bd9ff400a6a447f3efe0f78ad59 100644 (file)
@@ -745,7 +745,7 @@ BezTriple *BKE_nurb_bezt_get_prev(Nurb *nu, BezTriple *bezt)
        BezTriple *bezt_prev;
 
        BLI_assert(ARRAY_HAS_ITEM(bezt, nu->bezt, nu->pntsu));
-       BLI_assert(nu->pntsv == 1);
+       BLI_assert(nu->pntsv <= 1);
 
        if (bezt == nu->bezt) {
                if (nu->flagu & CU_NURB_CYCLIC) {
@@ -4144,6 +4144,7 @@ bool BKE_nurb_type_convert(Nurb *nu, const short type, const bool use_handles)
                        MEM_freeN(nu->bp);
                        nu->bp = NULL;
                        nu->pntsu = nr;
+                       nu->pntsv = 0;
                        nu->type = CU_BEZIER;
                        BKE_nurb_handles_calc(nu);
                }
index f6bbff2f5d4b7c05e6b71d102718f60fe32380d7..a1b73a54e3db213a6b46445da15d07f11f51a8be 100644 (file)
@@ -805,7 +805,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op)
        const float radius_range = cps->radius_max - cps->radius_min;
 
        Nurb *nu = MEM_callocN(sizeof(Nurb), __func__);
-       nu->pntsv = 1;
+       nu->pntsv = 0;
        nu->resolu = cu->resolu;
        nu->resolv = cu->resolv;
        nu->flag |= CU_SMOOTH;