diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-13 19:27:49 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-13 19:27:49 +0400 |
commit | 463ff86592ff220ca5a4c9f13439a0817024f57d (patch) | |
tree | 6fd8b0219b24dd0853c157b7be4df1b0ee607b9c /source/blender | |
parent | 135ee563e94b064ba4d4524a5a25c1c7b3964519 (diff) |
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..
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 26ae1b94aee..b02d587940a 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2242,15 +2242,18 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) } } 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); } } |