Page MenuHome

Ease Implementation
ClosedPublic

Authored by Christoph Lendenfeld (ChrisLend) on Nov 5 2020, 9:34 PM.
Tokens
"Pterodactyl" token, awarded by Gavriel5578."Like" token, awarded by erickblender."Love" token, awarded by jwvd."Love" token, awarded by Rusculleda."Love" token, awarded by Juangra_Membata.

Details

Summary

This patch adds the ease operator to the graph editor.

It aligns selected keys on an exponential curve where the exponent is controlled by a factor.

Diff Detail

Repository
rB Blender

Event Timeline

Sybren A. Stüvel (sybren) requested changes to this revision.Dec 13 2021, 4:16 PM
Sybren A. Stüvel (sybren) added inline comments.
source/blender/editors/animation/keyframes_general.c
461–462

This should probably be rewritten to use the FCurveSegment struct from D13531

source/blender/editors/space_graph/graph_slider_ops.c
945–949

Call BLI_freelistN(&segments); to avoid memory leak

This revision now requires changes to proceed.Dec 13 2021, 4:16 PM
  • Update to latest master
  • use new function slider_factor_get_and_remember
  • fix memory leak
  • use FCurveSegment as parameter for ease_fcurve_segment

@Sybren A. Stüvel (sybren)
Why aren't the changes been reviewed? I'm kind a new to programming (want to understend how it works).

I like it, just a few nitpicks from me. :)

source/blender/editors/animation/keyframes_general.c
482

The parentheses on the right-hand side of the statement are redundant.

source/blender/editors/space_graph/graph_slider_ops.c
816

I think LISTBASE_FOREACH can be used here.

rebase onto master and implement requested changes

@Sybren A. Stüvel (sybren)
Why aren't the changes been reviewed? I'm kind a new to programming (want to understend how it works).

No special reason, just many things to do in little time. Now that I have more time to spend on Animation & Rigging, I hope to catch up with all the reviews eventually :)

The code looks good to me!

Just one thing I'm wondering, UI/UX-wise. Right now the operator starts at 50%, which results in a straight line, and 0% and 100% are the two extremes (ignoring "E for overshoot"). Would it make sense to use the range -100% to 100%, and have 0% as the straight line? That way also the overshooting values are more symmetrical; currently -100% would be the inverse of 200%, and with my proposal those would be -150% and +150%.

The code looks good to me!

Just one thing I'm wondering, UI/UX-wise. Right now the operator starts at 50%, which results in a straight line, and 0% and 100% are the two extremes (ignoring "E for overshoot"). Would it make sense to use the range -100% to 100%, and have 0% as the straight line? That way also the overshooting values are more symmetrical; currently -100% would be the inverse of 200%, and with my proposal those would be -150% and +150%.

In order to change that I'd need to change the slider to have a settable min and max. That's a good idea to do anyway, but I think it's a bit much for this patch.

This revision is now accepted and ready to land.Dec 22 2022, 4:50 PM