diff options
Diffstat (limited to 'source/blender/blenkernel/intern/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 3b9fbbb1c4d..00a479b8b88 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2323,6 +2323,7 @@ void BKE_curve_bevelList_make(Object *ob) bl = MEM_callocN(sizeof(BevList) + 1 * sizeof(BevPoint), "makeBevelList1"); BLI_addtail(&(cu->bev), bl); bl->nr = 0; + bl->charidx = nu->charidx; } else { if (G.is_rendering && cu->resolu_ren != 0) @@ -2335,10 +2336,10 @@ void BKE_curve_bevelList_make(Object *ob) bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelList2"); BLI_addtail(&(cu->bev), bl); - if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0; - else bl->poly = -1; + bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1; bl->nr = len; bl->dupe_nr = 0; + bl->charidx = nu->charidx; bevp = (BevPoint *)(bl + 1); bp = nu->bp; @@ -2358,8 +2359,8 @@ void BKE_curve_bevelList_make(Object *ob) bl = MEM_callocN(sizeof(BevList) + len * sizeof(BevPoint), "makeBevelBPoints"); BLI_addtail(&(cu->bev), bl); - if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0; - else bl->poly = -1; + bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1; + bl->charidx = nu->charidx; bevp = (BevPoint *)(bl + 1); a = nu->pntsu - 1; @@ -2445,8 +2446,8 @@ void BKE_curve_bevelList_make(Object *ob) BLI_addtail(&(cu->bev), bl); bl->nr = len; bl->dupe_nr = 0; - if (nu->flagu & CU_NURB_CYCLIC) bl->poly = 0; - else bl->poly = -1; + bl->poly = (nu->flagu & CU_NURB_CYCLIC) ? 0 : -1; + bl->charidx = nu->charidx; bevp = (BevPoint *)(bl + 1); BKE_nurb_makeCurve(nu, &bevp->vec[0], @@ -2572,9 +2573,11 @@ void BKE_curve_bevelList_make(Object *ob) bl = sd->bl; /* is bl a hole? */ sd1 = sortdata + (a - 1); for (b = a - 1; b >= 0; b--, sd1--) { /* all polys to the left */ - if (bevelinside(sd1->bl, bl)) { - bl->hole = 1 - sd1->bl->hole; - break; + if (sd1->bl->charidx == bl->charidx) { /* for text, only check matching char */ + if (bevelinside(sd1->bl, bl)) { + bl->hole = 1 - sd1->bl->hole; + break; + } } } } |