[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59114] trunk/blender/source/blender/ blenkernel/intern/curve.c: Fix #36461: ends of curves - twist still not good

Sergey Sharybin sergey.vfx at gmail.com
Tue Aug 13 17:27:50 CEST 2013


Revision: 59114
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59114
Author:   nazgul
Date:     2013-08-13 15:27:49 +0000 (Tue, 13 Aug 2013)
Log Message:
-----------
Fix #36461: ends of curves - twist still not good

Needed correct quat for first point as well.

Maybe it's time to refactor make_minimum_twist function a bit..

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/curve.c

Modified: trunk/blender/source/blender/blenkernel/intern/curve.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/curve.c	2013-08-13 15:09:19 UTC (rev 59113)
+++ trunk/blender/source/blender/blenkernel/intern/curve.c	2013-08-13 15:27:49 UTC (rev 59114)
@@ -2242,15 +2242,18 @@
 		}
 	}
 	else {
-		/* Need to correct quat for the last point,
+		/* Need to correct quat for the first/last point,
 		 * this is so because previously it was only calculated
 		 * using it's own direction, which might not correspond
-		 * the twist of previous point.
+		 * the twist of neighbor point.
 		 */
+		bevp1 = (BevPoint *)(bl + 1);
+		bevp0 = bevp1 + 1;
+		minimum_twist_between_two_points(bevp1, bevp0);
+
 		bevp2 = (BevPoint *)(bl + 1);
 		bevp1 = bevp2 + (bl->nr - 1);
 		bevp0 = bevp1 - 1;
-
 		minimum_twist_between_two_points(bevp1, bevp0);
 	}
 }




More information about the Bf-blender-cvs mailing list