Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-04-13 02:17:59 +0300
committerHans Goudey <h.goudey@me.com>2020-04-13 02:17:59 +0300
commit71a333f56e40b6cedf1dcb21c281b5df7123d468 (patch)
treef574bacb42a094e518e2441cb00dc1570fdd98b4
parent68ba6378b5b14059e52a26306bc8b9f3db2e7299 (diff)
Fix T75592: Correctly calculate length of curve verts
Previous commit to fix T75405 needed a small change to increase the length of the front section of the curve when only the front is built.
-rw-r--r--source/blender/blenkernel/intern/curve.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 401014e0853..b4a8625c0bb 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -1877,7 +1877,9 @@ void BKE_curve_bevel_make(Object *ob, ListBase *disp)
}
/* Don't duplicate the last back vertex. */
angle = (cu->ext1 == 0.0f && (cu->flag & CU_BACK)) ? dangle : 0;
- int front_len = (cu->ext1 == 0.0f) ? cu->bevresol + 1 : cu->bevresol + 2;
+ int front_len = (cu->ext1 == 0.0f && ((cu->flag & CU_BACK) || !(cu->flag & CU_FRONT))) ?
+ cu->bevresol + 1 :
+ cu->bevresol + 2;
for (a = 0; a < front_len; a++) {
fp[0] = 0.0;
fp[1] = (float)(cosf(angle) * (cu->ext2));