Cleanup: Remove remaining unused code for DispList "bevel_split"

This was added in rB93aeb6b318a7, last changed in rB8f0a44a5d55d,
and removed in rB51b796ff1528. I assume it was a way for curves to
have split edges at corners. As far as I can tell it only ever worked
in Blender Internal, and that has been gone for years.

Another possible route here would be restoring this functionality,
but it's generally preferrable to reduce complexity in this
area of curve code than adding it back, especially in the context
of other improvements planned related to curves in geometry nodes.

Differential Revision: https://developer.blender.org/D9966
This commit is contained in:
Hans Goudey 2021-03-31 11:37:09 -05:00
parent 46ee9b599a
commit 910469eccf
4 changed files with 1 additions and 33 deletions

View File

@ -75,8 +75,6 @@ typedef struct DispList {
int *index;
int charidx;
int totindex; /* indexed array drawing surfaces */
unsigned int *bevel_split; /* BLI_bitmap */
} DispList;
void BKE_displist_copy(struct ListBase *lbn, struct ListBase *lb);

View File

@ -2756,7 +2756,6 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
bevp->tilt = bp->tilt;
bevp->radius = bp->radius;
bevp->weight = bp->weight;
bevp->split_tag = true;
bp++;
if (seglen != NULL && len != 0) {
*seglen = len_v3v3(bevp->vec, bp->vec);
@ -2828,7 +2827,6 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
bevp->tilt = prevbezt->tilt;
bevp->radius = prevbezt->radius;
bevp->weight = prevbezt->weight;
bevp->split_tag = true;
bevp->dupe_tag = false;
bevp++;
bl->nr++;
@ -2879,21 +2877,6 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
sizeof(BevPoint));
}
/* indicate with handlecodes double points */
if (prevbezt->h1 == prevbezt->h2) {
if (ELEM(prevbezt->h1, 0, HD_VECT)) {
bevp->split_tag = true;
}
}
else {
if (ELEM(prevbezt->h1, 0, HD_VECT)) {
bevp->split_tag = true;
}
else if (ELEM(prevbezt->h2, 0, HD_VECT)) {
bevp->split_tag = true;
}
}
/* seglen */
if (seglen != NULL) {
*seglen = 0;

View File

@ -74,9 +74,6 @@ void BKE_displist_elem_free(DispList *dl)
if (dl->index) {
MEM_freeN(dl->index);
}
if (dl->bevel_split) {
MEM_freeN(dl->bevel_split);
}
MEM_freeN(dl);
}
}
@ -137,10 +134,6 @@ void BKE_displist_copy(ListBase *lbn, ListBase *lb)
dln->verts = MEM_dupallocN(dl->verts);
dln->nors = MEM_dupallocN(dl->nors);
dln->index = MEM_dupallocN(dl->index);
if (dl->bevel_split) {
dln->bevel_split = MEM_dupallocN(dl->bevel_split);
}
}
}
@ -1609,8 +1602,6 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
/* CU_2D conflicts with R_NOPUNOFLIP */
dl->rt = nu->flag & ~CU_2D;
dl->bevel_split = BLI_BITMAP_NEW(steps, "bevel_split");
/* for each point of poly make a bevel piece */
BevPoint *bevp_first = bl->bevpoints;
BevPoint *bevp_last = &bl->bevpoints[bl->nr - 1];
@ -1659,10 +1650,6 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
}
}
if (bevp->split_tag) {
BLI_BITMAP_ENABLE(dl->bevel_split, a);
}
/* rotate bevel piece and write in data */
if ((a == 0) && (bevp != bevp_last)) {
rotateBevelPiece(

View File

@ -72,7 +72,7 @@ typedef struct BevPoint {
float sina, cosa;
/** 3D Only. */
float dir[3], tan[3], quat[4];
short split_tag, dupe_tag;
short dupe_tag;
} BevPoint;
/* These two Lines with # tell makesdna this struct can be excluded. */