diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-16 14:30:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-16 14:30:53 +0400 |
commit | 68dd3980638b6a1f0c766a1e023b393c0f36cacd (patch) | |
tree | 64846808a06af598e5df551ac4b500a352e46a17 /source/blender/editors/space_graph | |
parent | e9ab58ad8f0fbcb84a08e8013d4b024bea648f96 (diff) |
remove duplicate if'0'd functions, same versions are in drawarmature.c.
also added note of function to de-duplicate.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 2ba79ee230a..c1268ec61f0 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -386,6 +386,8 @@ static EnumPropertyItem prop_column_select_types[] = { /* ------------------- */ /* Selects all visible keyframes between the specified markers */ +/* TODO, this is almost an _exact_ duplicate of a function of the same name in action_select.c + * should de-duplicate - campbell */ static void markers_selectkeys_between (bAnimContext *ac) { ListBase anim_data = {NULL, NULL}; @@ -393,7 +395,7 @@ static void markers_selectkeys_between (bAnimContext *ac) int filter; KeyframeEditFunc ok_cb, select_cb; - KeyframeEditData ked; + KeyframeEditData ked= {{NULL}}; float min, max; /* get extreme markers */ @@ -404,9 +406,8 @@ static void markers_selectkeys_between (bAnimContext *ac) /* get editing funcs + data */ ok_cb= ANIM_editkeyframes_ok(BEZT_OK_FRAMERANGE); select_cb= ANIM_editkeyframes_select(SELECT_ADD); - - memset(&ked, 0, sizeof(KeyframeEditData)); - ked.f1= min; + + ked.f1= min; ked.f2= max; /* filter data */ @@ -416,8 +417,8 @@ static void markers_selectkeys_between (bAnimContext *ac) /* select keys in-between */ for (ale= anim_data.first; ale; ale= ale->next) { AnimData *adt= ANIM_nla_mapping_get(ac, ale); - - if (adt) { + + if (adt) { ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL); ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); |