Blender Git Loki

Git Commits -> Revision 4284300

Revision 4284300 by Alexander Gavrilov
August 4, 2017, 07:15 (GMT)
Squashed commit of the staging smooth-curves branch:

commit efa58808d453247664a61e5f2dfe5681acd648b8
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date: Fri Jul 28 09:07:48 2017 +0300

Experiment with smoothing color curves yet again.

commit b765d33459076d195c35b942de21a0e53d7624bc
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date: Sun Jun 4 20:29:17 2017 +0300

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.

commit f037c9a3c8e0a380b397d88c2a58aec5075d07f3
Author: Dalai Felinto <dfelinto@gmail.com>
Date: Mon Nov 18 16:58:23 2013 -0200

force fcurve AUTO handlers to use 1/3 of the distance for smoothness
see: http://www.blender.org/forum/viewtopic.php?p=65508&sid=02e88fe6e3a43338ec8bc354991bc402

Note: this is also used by the curve code. The magic number 2.5614f
comes from review 290361776e5858b3903a83c0cddf722b8340e699

commit 7cb409dd6ed3dac92d0861fa5ab8e26da895cf52
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date: Sun Jun 4 17:15:06 2017 +0300

Add an FCurve flag to toggle new smoothing behavior.

The flag is exposed in UI below the curve color selector.

commit 8bd42dc90c2c5f374f0611638b73760cf3905121
Author: Alexander Gavrilov <angavrilov@gmail.com>
Date: Sun Apr 30 16:14:39 2017 +0300

Make auto handle placement aware of cyclic extrapolation.

Cyclic extrapolation is implemented as an f-curve modifier, so this
technically violates abstraction separation and is something of a hack.
However without such behavior achieving smooth looping with cyclic
extrapolation is extremely cumbersome.

The new behavior is applied when the first modifier is Cyclic
extrapolation in Repeat or Repeat with Offset mode without
using influence, repeat count or range restrictions.

This change in behavior means that curve handles have to be updated
when the modifier is added, removed or its options change. Due to the
way code is structured, it seems it requires a helper link to the
containing curve from the modifier object.

Commit Details:

Full Hash: 42843004fdab789f94b6f25b178aedfdf9b24960
Parent Commit: 968fef8
Lines Changed: +1443, -86

29 Modified Paths:

/source/blender/blenkernel/BKE_curve.h (+4, -1) (Diff)
/source/blender/blenkernel/BKE_fcurve.h (+2, -1) (Diff)
/source/blender/blenkernel/intern/colortools.c (+46, -35) (Diff)
/source/blender/blenkernel/intern/curve.c (+1095, -10) (Diff)
/source/blender/blenkernel/intern/fcurve.c (+68, -5) (Diff)
/source/blender/blenkernel/intern/fmodifier.c (+14, -1) (Diff)
/source/blender/blenkernel/intern/ipo.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/mask.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/nla.c (+2, -2) (Diff)
/source/blender/blenlib/BLI_math_solvers.h (+5, -0) (Diff)
/source/blender/blenlib/intern/math_solvers.c (+112, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+8, -5) (Diff)
/source/blender/editors/animation/drivers.c (+2, -2) (Diff)
/source/blender/editors/animation/fmodifier_ui.c (+9, -2) (Diff)
/source/blender/editors/animation/keyframing.c (+1, -1) (Diff)
/source/blender/editors/curve/editcurve.c (+1, -1) (Diff)
/source/blender/editors/include/ED_anim_api.h (+1, -1) (Diff)
/source/blender/editors/interface/interface_templates.c (+19, -0) (Diff)
/source/blender/editors/object/object_constraint.c (+1, -1) (Diff)
/source/blender/editors/object/object_relations.c (+1, -1) (Diff)
/source/blender/editors/space_action/action_edit.c (+1, -1) (Diff)
/source/blender/editors/space_graph/graph_buttons.c (+4, -1) (Diff)
/source/blender/editors/space_graph/graph_edit.c (+6, -6) (Diff)
/source/blender/editors/space_nla/nla_edit.c (+3, -3) (Diff)
/source/blender/makesdna/DNA_anim_types.h (+3, -0) (Diff)
/source/blender/makesdna/DNA_color_types.h (+1, -0) (Diff)
/source/blender/makesdna/DNA_curve_types.h (+8, -1) (Diff)
/source/blender/makesrna/intern/rna_color.c (+4, -0) (Diff)
/source/blender/makesrna/intern/rna_fcurve.c (+18, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021