Page MenuHome

Graph Editor: Fix selection and View > Selected with 'View Only Selected Curve Keyframes' option enabled

Authored by Philipp Oeser (lichtwerk) on Nov 12 2019, 7:41 PM.



With 'View Only Selected Curve Keyframes' option enabled, it was
possible to select [box/circle/lasso] hidden/non-visible keyframes.
Think this should never happen.

Also 'View > Selected' was taking the hidden/non-visible keyframes into
account when calculating the keyframe extends for zooming.

related to T68962
Fixes T67873

P.S.: please test thouroughly (I'm still doing as well -- animfilter code is hairy on first sight...)

Diff Detail

rB Blender

Event Timeline


This snippet is duplicated twice now, and something similar maybe occurs in other places as well. Would it be good to have a function for this? Or is it really only used here, and is this a duplication we can live with?


I think it is best to decouple the selection behavior (second case below) from the actual "fix" for View Selected.
See my comment in T68962.

That would leave us with only one case in this Diff, and only later (if we decide to tweak all the selection operators as well), we can use this in more places and dedouplicate into own function. Right?

If you think the same, I will update the Diff and remove the change to box_select_graphkeys for now...


If you think the same

I think the same.

The effective changes done here should be fine. Don't really care about how the patch is split, we're just nit-picking a bit here :)


Although I don't think this minor code duplication is a big deal at all, something like graph_get_animdata_for_select() that handles the common select filters and calls ANIM_animdata_filter() would be nice.

This revision is now accepted and ready to land.Thu, Nov 21, 12:30 PM

Fix View > Selected only [will do selection fixing in a later commit]

Fix View > Selected only [will do selection fixing in a later commit]