Fix T74755: Cap of curve doesn't have smooth shading

Copy the smooth setting when filling in curve caps.

For drawing this doesn't change behavior as a single normal is used
for all faces.

The difference may be noticed when converting to a mesh or with
modifiers applied.
This commit is contained in:
Campbell Barton 2021-01-19 17:24:25 +11:00
parent 1cc54107a9
commit df2ed1550d
Notes: blender-bot 2023-02-14 06:00:51 +01:00
Referenced by issue #74755, Filled cap of curve with weld+bevel modifier doesn't have smooth shading
1 changed files with 3 additions and 0 deletions

View File

@ -488,6 +488,7 @@ void BKE_displist_fill(ListBase *dispbase,
while (cont) {
int dl_flag_accum = 0;
int dl_rt_accum = 0;
cont = 0;
totvert = 0;
nextcol = 0;
@ -535,6 +536,7 @@ void BKE_displist_fill(ListBase *dispbase,
}
}
dl_flag_accum |= dl->flag;
dl_rt_accum |= dl->rt;
}
}
@ -544,6 +546,7 @@ void BKE_displist_fill(ListBase *dispbase,
dlnew = MEM_callocN(sizeof(DispList), "filldisplist");
dlnew->type = DL_INDEX3;
dlnew->flag = (dl_flag_accum & (DL_BACK_CURVE | DL_FRONT_CURVE));
dlnew->rt = (dl_rt_accum & CU_SMOOTH);
dlnew->col = colnr;
dlnew->nr = totvert;
dlnew->parts = tot;