diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-11 19:35:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-11 19:35:30 +0400 |
commit | ee768ada680ce0a8aa184c882005c0ef1c0140fb (patch) | |
tree | e4f475510c9628d9fae6b3ff3581276b4af3f374 /release/ui | |
parent | 042d3e595693ce0c280b46d13db921afbcf105a4 (diff) |
curve twist
* added new twist method - "Tangent", suggested by Martin.
the nice thing about this is its stable no matter how you rotate the data, rotation is local to each segment.
* added smooth option that smooths the twisting (before applying user twist), to workaround Z-Up and Tangent's ugly curve twisting. Id prefer not to have this however it makes tangent much nicer. Possibly tangent can be improved some other way and this can be removed.
A smooth value of 1.0 will iterate over and smooth the twisting by the resolution value of the spline.
* Minimum-Twist method now corrects for cyclic twist by taking the roll difference between first and last, then increasingly counter rotate each segment over the entire curve. Previously it calculated from both directions and blended them.
details
* BevPoints use quats rather then 3x3 matrix.
* added BevPoint direction "dir" and tangent "tan" used only for 3D curves.
* don't calculate BevPoint->cosa, BevPoint->sina for 3D curves.
* split bevel tilt calculation into functions.
* nurbs curves currently don't generate tangents and wont work with tangent twist method.
* some of the use of quats should be optimized.
* smoothing is not animation safe, the higher the smoothing the higher the likelyhood of flipping.
Diffstat (limited to 'release/ui')
-rw-r--r-- | release/ui/buttons_data_curve.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py index 1124dfd1ae8..010acd1479d 100644 --- a/release/ui/buttons_data_curve.py +++ b/release/ui/buttons_data_curve.py @@ -56,8 +56,7 @@ class DATA_PT_shape_curve(DataButtonsPanel): if not is_surf: row = layout.row() - row.itemR(curve, "curve_2d") - row.itemR(curve, "use_twist_correction") + row.itemR(curve, "curve_2d") split = layout.split() @@ -86,6 +85,11 @@ class DATA_PT_shape_curve(DataButtonsPanel): sub.itemR(curve, "resolution_v", text="Preview V") sub.itemR(curve, "render_resolution_v", text="Render V") + # XXX - put somewhere nicer. + row= layout.row() + row.itemR(curve, "twist_mode") + row.itemR(curve, "twist_smooth") # XXX - may not be kept + # col.itemL(text="Display:") # col.itemL(text="HANDLES") |