diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-19 18:12:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-19 18:12:14 +0300 |
commit | f75301939c4f69e2144bf530cdc6a0f91e29716f (patch) | |
tree | 4121de459c63487fc7999f76b0b89e7c235b428d /source | |
parent | abb5214a8f47f65030e5d0bec8cd974e9ade4248 (diff) |
Aligorith: please check. this was copied from mouse select. however BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP) is running which looks like it should be doing the remapping. however both functions are needed for this to work.
Committing since Lee wants border select to work in the graph editor but feel free to revert.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 8d2e2921b7f..b19b6fdbbc9 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -239,7 +239,10 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); FCurve *fcu= (FCurve *)ale->key_data; - + + if (adt) + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); + /* set horizontal range (if applicable) */ if (mode != BEZT_OK_VALUERANGE) { /* if channel is mapped in NLA, apply correction */ @@ -266,6 +269,10 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho if (selectmode == SELECT_ADD) { fcu->flag |= FCURVE_SELECTED; } + + /* un-apply NLA mapping from all the keyframes */ + if (adt) + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } /* cleanup */ |