diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2017-08-10 21:48:23 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2017-08-20 17:09:50 +0300 |
commit | 7a765e7afa5ab3b624297beb29b78c34c718f75d (patch) | |
tree | e124dfc97f3fb520ca58aeb7aa48a06667658f62 /source/blender/editors/space_graph/graph_buttons.c | |
parent | 0d814a2e49197d50c1945ab994928a06b7bc3b78 (diff) |
Implement a new automatic handle algorithm to produce smooth F-Curves.
The legacy algorithm only considers two adjacent points when computing
the bezier handles, which cannot produce satisfactory results. Animators
are often forced to manually adjust all curves.
The new approach instead solves a system of equations to trace a cubic spline
with continuous second derivative through the whole segment of auto points,
delimited at ends by keyframes with handles set by other requirements.
This algorithm also adjusts Vector handles that face ordinary bezier keyframes
to achieve zero acceleration at the Vector keyframe, instead of simply pointing
it at the adjacent point.
Original idea and implementation by Benoit Bolsee <benoit.bolsee@online.be>;
code mostly rewritten to improve code clarity and extensibility.
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index cbb8e98e7e0..985cca7c4af 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -208,7 +208,12 @@ static void graph_panel_properties(const bContext *C, Panel *pa) sub = uiLayoutRow(row, true); uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM)); uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE); - + + /* smoothing setting */ + col = uiLayoutColumn(layout, true); + uiItemL(col, IFACE_("Auto Handle Smoothing:"), ICON_NONE); + uiItemR(col, &fcu_ptr, "auto_smoothing", 0, "", ICON_NONE); + MEM_freeN(ale); } |