diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-06-21 08:01:51 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-06-21 08:01:51 +0400 |
commit | 24ca3eb4c42f3dfb4e2b775f53b35e4c4dcd8367 (patch) | |
tree | bb566767311f1f3b07a91333023cea24d5b657eb /source/blender/editors/space_nla | |
parent | a4178b7a6a1ce804f581c0e3289aa0f912085c78 (diff) |
AnimFiltering Code Cleanups - Part 2
* Changed all int's to size_t's, where the int's were used for size of
channel list returned
* Object vs Base is now passed to filtering functions - was relic from
old owner/ownertype code which required access to bases
* Found bug in NLA code where filter was being overwritten and then
used again as input for some other function unintentionally
* Found bug where trying to select a NLA strip would crash if lamp
data was around
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_channels.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 38f680fff07..be050dded45 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -81,13 +81,14 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; int filter; + View2D *v2d= &ac->ar->v2d; int notifierFlags = 0; /* get the channel that was clicked on */ /* filter channels */ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CHANNELS); - filter= ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* get channel from index */ ale= BLI_findlink(&anim_data, channel_index); diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index c4a3a2324b4..c53eac78b19 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -470,7 +470,8 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar) View2D *v2d= &ar->v2d; float y= 0.0f; - int items, height; + size_t items; + int height; /* build list of channels to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS); @@ -828,7 +829,8 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, ARegion *ar) View2D *v2d= &ar->v2d; float y= 0.0f; - int items, height; + size_t items; + int height; /* build list of channels to draw */ filter= (ANIMFILTER_VISIBLE|ANIMFILTER_CHANNELS); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 77c91b28a63..08607e6183b 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -250,7 +250,8 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) ListBase anim_data = {NULL, NULL}; bAnimListElem *ale; - int filter, items; + size_t items; + int filter; bAction *act; |