NLA: insert keyframes correctly for strips with non-Replace mode.
authorAlexander Gavrilov <angavrilov@gmail.com>
Mon, 12 Nov 2018 16:41:53 +0000 (19:41 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Fri, 14 Dec 2018 19:19:18 +0000 (22:19 +0300)
commitde662e7cd3b3ca45c4220e3830c32e2b3496c9fe
tree79b78cc746c5121ac4c964dffef94d961fd14975
parentfc74903f272a01784e0376c9ee12c2673017285d
NLA: insert keyframes correctly for strips with non-Replace mode.

NLA strips support using the keyframe values in a variety of ways:
adding, subtracting, multiplying, linearly mixing with the result
of strips located below in the stack. This is intended for layering
tweaks on top of a base animation.

However, when inserting keyframes into such strips, it simply inserts
the final value of the property, irrespective of these settings. This
in fact makes the feature nearly useless.

To fix this it is necessary to evaluate the NLA stack below the
edited strip and correctly compute the raw key that would produce
the intended final value, according to the mode and influence.

Differential Revision: https://developer.blender.org/D3927
13 files changed:
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/nla_private.h
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/include/ED_keyframing.h
source/blender/editors/interface/interface_anim.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/transform/transform_conversions.c
source/blender/python/intern/bpy_rna_anim.c