diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-04-15 19:22:02 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-04-15 19:23:53 +0400 |
commit | 43b7dac427a6faa09ab5d7c9a47690a0a5ae168f (patch) | |
tree | 956614ac5758e1b514ac095ce8c4c0ad94b386dd /source | |
parent | d2a5ddb4ec12245b4d1580490d88e808a2a04761 (diff) |
Use binary search threshold when deciding whether to create ActKeyColumns too...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 4dc3b1701ee..3f7e9212e5d 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -86,10 +86,14 @@ short compare_ak_cfraPtr(void *node, void *data) { ActKeyColumn *ak = (ActKeyColumn *)node; float *cframe = data; + float val = *cframe; + + if (IS_EQT(val, ak->cfra, BEZT_BINARYSEARCH_THRESH)) + return 0; - if (*cframe < ak->cfra) + if (val < ak->cfra) return -1; - else if (*cframe > ak->cfra) + else if (val > ak->cfra) return 1; else return 0; |