[Bf-blender-cvs] [36a82314a0f] master: Fix T71137: curve minimum twist producing wrong geometry

Campbell Barton noreply at git.blender.org
Tue Jan 24 06:44:15 CET 2023


Commit: 36a82314a0f5de65b54f6d8343a2899ed4e37010
Author: Campbell Barton
Date:   Tue Jan 24 16:28:22 2023 +1100
Branches: master
https://developer.blender.org/rB36a82314a0f5de65b54f6d8343a2899ed4e37010

Fix T71137: curve minimum twist producing wrong geometry

Only one point should be used to create a reference rotation for other
points to follow. Using two caused the resulting twist to be
asymmetric, especially noticeable on symmetrical, cyclic curves.

Alternate fix to D11886 which caused T101843.

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

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

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

diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc
index a18cd2f6314..7fe8174d864 100644
--- a/source/blender/blenkernel/intern/curve.cc
+++ b/source/blender/blenkernel/intern/curve.cc
@@ -2260,7 +2260,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
   nr = bl->nr;
   while (nr--) {
 
-    if (nr + 3 > bl->nr) { /* first time and second time, otherwise first point adjusts last */
+    if (nr + 1 >= bl->nr) { /* First 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