Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2017-10-24 06:27:21 +0300
committerJoshua Leung <aligorith@gmail.com>2017-10-24 06:27:56 +0300
commitc71f2f140444e4079e2b2fc24cf9995f3a116811 (patch)
tree553a64a7dcc6905f4cdfc1fa80d0356eddc08247 /source/blender/editors/space_graph
parenta1aad1f8d15ecdad4a22c34a3708ba6f8c815079 (diff)
Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_select.c9
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) {