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:
Diffstat (limited to 'source/blender/editors/space_nla/nla_select.c')
-rw-r--r--source/blender/editors/space_nla/nla_select.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 8ef63b9a83d..5dc937d3ce1 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -114,7 +114,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 +225,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 +243,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 +397,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 +506,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 +517,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 +526,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 */