From c71f2f140444e4079e2b2fc24cf9995f3a116811 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 24 Oct 2017 16:27:21 +1300 Subject: Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor --- source/blender/editors/space_graph/graph_select.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_graph') diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 68982275c79..1683fbdbdb9 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -1085,6 +1085,8 @@ typedef struct tNearestVertInfo { int dist; /* distance from mouse to vert */ eAnim_ChannelType ctype; /* type of animation channel this FCurve comes from */ + + float frame; /* frame that point was on when it matched (global time) */ } tNearestVertInfo; /* Tags for the type of graph vert that we have */ @@ -1151,6 +1153,8 @@ static void nearest_fcurve_vert_store( nvi->hpoint = hpoint; nvi->dist = dist; + nvi->frame = bezt->vec[1][0]; /* currently in global time... */ + nvi->sel = BEZT_ISSEL_ANY(bezt); // XXX... should this use the individual verts instead? /* add to list of matches if appropriate... */ @@ -1435,10 +1439,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short /* get frame number on which elements should be selected */ // TODO: should we restrict to integer frames only? - if (nvi->bezt) - selx = nvi->bezt->vec[1][0]; - else if (nvi->fpt) - selx = nvi->fpt->vec[0]; + selx = nvi->frame; /* if select mode is replace, deselect all keyframes first */ if (select_mode == SELECT_REPLACE) { -- cgit v1.2.3