[Bf-blender-cvs] [df2ed1550d6] master: Fix T74755: Cap of curve doesn't have smooth shading

Campbell Barton noreply at git.blender.org
Tue Jan 19 07:24:47 CET 2021


Commit: df2ed1550d69fc05892b9f5d392ff188e46504cd
Author: Campbell Barton
Date:   Tue Jan 19 17:24:25 2021 +1100
Branches: master
https://developer.blender.org/rBdf2ed1550d69fc05892b9f5d392ff188e46504cd

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.

===================================================================

M	source/blender/blenkernel/intern/displist.c

===================================================================

diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 375792a02c2..98af3575081 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -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;



More information about the Bf-blender-cvs mailing list