diff options
Diffstat (limited to 'source/blender/editors/space_nla/nla_select.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_select.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 8ef63b9a83d..c33316620eb 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -114,7 +112,8 @@ static void deselect_nla_strips (bAnimContext *ac, short test, short sel) short smode; /* determine type-based settings */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS); + // FIXME: double check whether ANIMFILTER_LIST_VISIBLE is needed! + filter= (ANIMFILTER_DATA_VISIBLE); /* filter data */ ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); @@ -224,16 +223,17 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh bAnimListElem *ale; int filter; + SpaceNla *snla = (SpaceNla *)ac->sl; View2D *v2d= &ac->ar->v2d; rctf rectf; - float ymin=(float)(-NLACHANNEL_HEIGHT), ymax=0; + float ymin=(float)(-NLACHANNEL_HEIGHT(snla)), ymax=0; /* convert border-region to view coordinates */ UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin); UI_view2d_region_to_view(v2d, rect.xmax, rect.ymax-2, &rectf.xmax, &rectf.ymax); /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); + filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* convert selection modes to selection modes */ @@ -241,7 +241,7 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh /* loop over data, doing border select */ for (ale= anim_data.first; ale; ale= ale->next) { - ymin= ymax - NLACHANNEL_STEP; + ymin= ymax - NLACHANNEL_STEP(snla); /* perform vertical suitability check (if applicable) */ if ( (mode == NLA_BORDERSEL_FRAMERANGE) || @@ -395,7 +395,7 @@ static void nlaedit_select_leftright (bContext *C, bAnimContext *ac, short leftr /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_NLATRACKS); + filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* select strips on the side where most data occurs */ @@ -504,6 +504,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2], bAnimListElem *ale = NULL; int filter; + SpaceNla *snla = (SpaceNla *)ac->sl; View2D *v2d= &ac->ar->v2d; Scene *scene= ac->scene; NlaStrip *strip = NULL; @@ -514,7 +515,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2], /* use View2D to determine the index of the channel (i.e a row in the list) where keyframe was */ UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); - UI_view2d_listview_view_to_cell(v2d, 0, NLACHANNEL_STEP, 0, (float)NLACHANNEL_HEIGHT_HALF, x, y, NULL, &channel_index); + UI_view2d_listview_view_to_cell(v2d, 0, NLACHANNEL_STEP(snla), 0, (float)NLACHANNEL_HEIGHT_HALF(snla), x, y, NULL, &channel_index); /* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click * (that is the size of keyframe icons, so user should be expecting similar tolerances) @@ -523,7 +524,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2], UI_view2d_region_to_view(v2d, mval[0]+7, mval[1], &xmax, &dummy); /* filter data */ - filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); + filter= (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_LIST_CHANNELS); ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* try to get channel */ |