diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-24 13:19:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-24 13:19:48 +0300 |
commit | 7ea7fd45d0fffed5cc67769a9fe050ae6a574554 (patch) | |
tree | 032b450cf6ee9d9a40c8f307305df1eff350266e /source/blender/editors/space_graph | |
parent | f5456df095291c6cb2d0223a179746c8e514cd15 (diff) | |
parent | e03df90bf36f907a99ebd8cba6cf03cf05ca71a3 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_graph')
-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) { |