Page MenuHome

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

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

Details

Summary

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

Repository
rB Blender

Event Timeline

source/blender/editors/space_graph/graph_edit.c
95–100

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?

source/blender/editors/space_graph/graph_edit.c
95–100

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...

source/blender/editors/space_graph/graph_edit.c
95–100

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 :)

source/blender/editors/space_graph/graph_edit.c
95–100

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]

Thanks!