Page MenuHome

Add an option to do keyframe insertion in a cycle-aware fashion.
ClosedPublic

Authored by Alexander Gavrilov (angavrilov) on Apr 9 2018, 6:40 PM.

Details

Summary

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.

For now this option is ignored in action and graph editor, since
there the user more directly operates on the keyframe sequence,
in contrast with (auto) keyframing through 3d view.

Diff Detail

Repository
rB Blender

Event Timeline

Rebased to 2.8, some code style fixes, and make key insertion use the mode even in dope sheet and graph editor for consistency, as recommended by @William Reynish (billreynish).

Just want to say this is a fantastic idea !

This revision is now accepted and ready to land.Oct 29 2018, 7:37 PM
Campbell Barton (campbellbarton) added inline comments.
source/blender/editors/animation/keyframing.c
394–403

Since this is an exceptional case, think the block can be surrounded by if (flag & INSERTKEY_CYCLE_AWARE) { ... }, otherwise it reads like this might run replace_bezt_keyframe_ypos again in the common case.

This revision was automatically updated to reflect the committed changes.