[Bf-blender-cvs] [a6a0cbcd749] master: Curves: Allow caps for all geometry types

Hans Goudey noreply at git.blender.org
Fri Sep 18 20:30:27 CEST 2020


Commit: a6a0cbcd7492bd8087b6df659c365482614b13e2
Author: Hans Goudey
Date:   Fri Sep 18 13:30:01 2020 -0500
Branches: master
https://developer.blender.org/rBa6a0cbcd7492bd8087b6df659c365482614b13e2

Curves: Allow caps for all geometry types

I think this wasn't allowed before because the section of a curve was
built in multiple parts. But since rBe34d3e32dda7, the whole slice
of a curve is built in one piece, so we can easily support curve
caps for all geometry types, including the new custom profile option.

Note that this also allows "caps" when the fill type is not full.
They could easily be disabled by checking for "Full" fill type
if that was preferred in the future.

See the patch for images.

Differential Revision: https://developer.blender.org/D8911

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

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

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

diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 5c162486c85..8fdd6ee69d9 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1753,7 +1753,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
                   rotateBevelPiece(cu, bevp, NULL, dlb, 0.0f, widfac, fac, &data);
                 }
 
-                if (cu->bevobj && (cu->flag & CU_FILL_CAPS) && !(nu->flagu & CU_NURB_CYCLIC)) {
+                if ((cu->flag & CU_FILL_CAPS) && !(nu->flagu & CU_NURB_CYCLIC)) {
                   if (a == 1) {
                     fillBevelCap(nu, dlb, cur_data - 3 * dlb->nr, &bottom_capbase);
                     copy_v3_v3(bottom_no, bevp->dir);



More information about the Bf-blender-cvs mailing list