Commit: 43b7dac427a6faa09ab5d7c9a47690a0a5ae168f
Author: Joshua Leung
Date:   Wed Apr 16 03:22:02 2014 +1200
https://developer.blender.org/rB43b7dac427a6faa09ab5d7c9a47690a0a5ae168f

Use binary search threshold when deciding whether to create ActKeyColumns too...

===================================================================

M       source/blender/editors/animation/keyframes_draw.c

===================================================================

diff --git a/source/blender/editors/animation/keyframes_draw.c 
b/source/blender/editors/animation/keyframes_draw.c
index 4dc3b17..3f7e921 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to