Add an option to do keyframe insertion in a cycle-aware fashion.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sun, 14 Oct 2018 10:04:34 +0000 (13:04 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Wed, 31 Oct 2018 08:50:57 +0000 (11:50 +0300)
commit7bc84559aa80841591f1ccf5c09f843931d6dabb
tree867290fec9a706df649baac761620aa864a7c0c2
parent2d37f555594e5487dc0bd3508887cd452891fbb8
Add an option to do keyframe insertion in a cycle-aware fashion.

When enabled, inserting keyframes into F-Curves with simple cyclic
extrapolation (the same conditions as required for cycle-aware auto
handle smoothing to activate) will take the cycle into account:

- Keyframes that are being inserted outside of the cycle bounds
  are remapped to be inside the cycle. Thus it is not necessary
  to be within the main iteration of the cycle when tweaking.

  This becomes especially useful in the final animation tweaking
  phase when the channel keys may be staggered for overlap, so
  the actual master period is different for different channels.

- Modifying one of the end points of a cycle also changes the
  other end point when appropriate, to preserve smooth transition.

This feature applies to both manual keyframe insertion using
'I', and auto-keyframing.

Differential Revision: https://developer.blender.org/D3140
release/scripts/startup/bl_ui/space_time.py
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/intern/fcurve.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/makesdna/DNA_anim_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_scene.c