Page MenuHome

Fix T81890: Active keyframe changes with active FCurve on deselect of keyframe
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Oct 23 2020, 5:07 PM.

Details

Summary

Deselecting a keyframe makes its FCurve selected and active. This causes another keyframe to be considered the Active Keyframe, namely the last-selected keyframe of the now-active curve. This behaviour is unintuitive, and inconsistent with the commit message in rB983ad4210b9e:

The active keyframe in the graph editor is treated similarly to the active vertex in the 3D view. It is the keyframe most recently selected with a single click, and it is always selected.

T81890 has an example file and steps to reproduce.

Another solution would be to decouple the active keyframe from the active FCurve. That would be a bigger change, though, and I think that with this small change things are behaving much better already.

Diff Detail

Repository
rB Blender

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Oct 23 2020, 5:07 PM
source/blender/editors/space_graph/graph_select.c
1569

What about using BEZT_ISSEL_ANY(bezt)? Then you wouldn't have to define a new bool? I guess you want it to not select if you deselect just a handle?

source/blender/editors/space_graph/graph_select.c
1569

BEZT_ISSEL_ANY(bezt) doesn't reflect what changed, it only reflects what is currently selected. As such, it's not suitable to responding to whether something was selected or not.

BEZT_ISSEL_ANY(bezt) will return true when its handles are selected, even after you just deselected the keyframe itself.

Hans Goudey (HooglyBoogly) added inline comments.
source/blender/editors/space_graph/graph_select.c
1569

Makes sense, just wanted to check.

This makes sense. The active channel should really only be affected if the selection actually changes.

I agree that's the best option

This revision is now accepted and ready to land.Oct 23 2020, 5:37 PM