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

This commit is contained in:
Joshua Leung 2014-04-16 03:22:02 +12:00
parent d2a5ddb4ec
commit 43b7dac427
Notes: blender-bot 2023-02-14 10:46:10 +01:00
Referenced by issue #39818, Strips from file with long filename broke auto-naming - animation can't be apply on it
1 changed files with 6 additions and 2 deletions

View File

@ -86,10 +86,14 @@ short compare_ak_cfraPtr(void *node, void *data)
{
ActKeyColumn *ak = (ActKeyColumn *)node;
float *cframe = data;
float val = *cframe;
if (*cframe < ak->cfra)
if (IS_EQT(val, ak->cfra, BEZT_BINARYSEARCH_THRESH))
return 0;
if (val < ak->cfra)
return -1;
else if (*cframe > ak->cfra)
else if (val > ak->cfra)
return 1;
else
return 0;