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_graph/graph_utils.c | |
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_graph/graph_utils.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_utils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index e4509a29a91..e20b4593fa9 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -70,7 +70,7 @@ bAnimListElem *get_active_fcurve_channel (bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; int filter= (ANIMFILTER_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_ACTIVE | ANIMFILTER_CURVESONLY); - int items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); + size_t items = ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype); /* We take the first F-Curve only, since some other ones may have had 'active' flag set * if they were from linked data. @@ -99,7 +99,8 @@ int graphop_visible_keyframes_poll (bContext *C) bAnimListElem *ale; ListBase anim_data = {NULL, NULL}; ScrArea *sa= CTX_wm_area(C); - int filter, items; + size_t items; + int filter; short found = 0; /* firstly, check if in Graph Editor */ @@ -147,7 +148,8 @@ int graphop_editable_keyframes_poll (bContext *C) bAnimListElem *ale; ListBase anim_data = {NULL, NULL}; ScrArea *sa= CTX_wm_area(C); - int filter, items; + size_t items; + int filter; short found = 0; /* firstly, check if in Graph Editor */ @@ -230,7 +232,8 @@ int graphop_selected_fcurve_poll (bContext *C) bAnimContext ac; ListBase anim_data = {NULL, NULL}; ScrArea *sa= CTX_wm_area(C); - int filter, items; + size_t items; + int filter; /* firstly, check if in Graph Editor */ // TODO: also check for region? |