[Bf-blender-cvs] [54dd355] master: Fix T38562: Wrong curve tilt after Switch Direction
Sergey Sharybin
noreply at git.blender.org
Fri Feb 14 09:59:14 CET 2014
Commit: 54dd355cc866ecfe4583857c09ee9e8d2938428c
Author: Sergey Sharybin
Date: Fri Feb 14 14:58:52 2014 +0600
https://developer.blender.org/rB54dd355cc866ecfe4583857c09ee9e8d2938428c
Fix T38562: Wrong curve tilt after Switch Direction
===================================================================
M source/blender/blenkernel/intern/curve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 8567a57..2454c10 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -3519,6 +3519,9 @@ void BKE_nurb_direction_switch(Nurb *nu)
bezt1->alfa = -bezt1->alfa;
bezt2->alfa = -bezt2->alfa;
}
+ else {
+ bezt1->alfa = -bezt1->alfa;
+ }
a--;
bezt1++;
bezt2--;
@@ -3537,6 +3540,12 @@ void BKE_nurb_direction_switch(Nurb *nu)
bp1++;
bp2--;
}
+ /* If there're odd number of points no need to touch coord of middle one,
+ * but still need to change it's tilt.
+ */
+ if (nu->pntsu & 1) {
+ bp1->alfa = -bp1->alfa;
+ }
if (nu->type == CU_NURBS) {
/* no knots for too short paths */
if (nu->knotsu) {
More information about the Bf-blender-cvs
mailing list