Implement a new automatic handle algorithm to produce smooth F-Curves.
authorAlexander Gavrilov <angavrilov@gmail.com>
Wed, 1 Nov 2017 18:34:30 +0000 (21:34 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Wed, 1 Nov 2017 18:57:39 +0000 (21:57 +0300)
commit8bdc391c5488228dfe9c9e995277d67558293f08
treeee7296ec1348a36546357f62271c0324d86e0e0a
parent88356a24422faf45d6355b449b3855e6904edf51
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.

Reviewers: aligorith

Differential Revision: https://developer.blender.org/D2884
14 files changed:
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/mask.c
source/blender/blenkernel/intern/nla.c
source/blender/blenlib/BLI_math_solvers.h
source/blender/blenlib/intern/math_solvers.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/keyframing.c
source/blender/editors/curve/editcurve.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/makesdna/DNA_anim_types.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesrna/intern/rna_fcurve.c