diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-10-24 06:27:21 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-10-24 06:27:56 +0300 |
commit | c71f2f140444e4079e2b2fc24cf9995f3a116811 (patch) | |
tree | 553a64a7dcc6905f4cdfc1fa80d0356eddc08247 | |
parent | a1aad1f8d15ecdad4a22c34a3708ba6f8c815079 (diff) |
Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) { |