From 23a4149778c879d8a57edd211efefa8a740abd52 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Fri, 13 Sep 2019 17:15:26 +0200 Subject: [PATCH] Fix "minimum twist" curve flipping issue Correct the code to actually do what the comment says. This fixes an issue where the curve would flip 180 degrees under certain conditions. --- source/blender/blenkernel/intern/curve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 0080eb1a9d7..67b0aaffc4a 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2370,7 +2370,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) nr = bl->nr; while (nr--) { - if (nr + 4 > bl->nr) { /* first time and second time, otherwise first point adjusts last */ + if (nr + 3 > bl->nr) { /* first time and second time, otherwise first point adjusts last */ vec_to_quat(bevp1->quat, bevp1->dir, 5, 1); } else {