[Bf-blender-cvs] [23a4149778c] master: Fix "minimum twist" curve flipping issue

Sebastian Parborg noreply at git.blender.org
Fri Sep 13 17:18:46 CEST 2019


Commit: 23a4149778c879d8a57edd211efefa8a740abd52
Author: Sebastian Parborg
Date:   Fri Sep 13 17:15:26 2019 +0200
Branches: master
https://developer.blender.org/rB23a4149778c879d8a57edd211efefa8a740abd52

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.

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

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

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

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 {



More information about the Bf-blender-cvs mailing list