diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-03-19 17:22:42 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-03-19 17:23:04 +0400 |
commit | 22ab652bb095d1ed69927ab76010fc0e6186799f (patch) | |
tree | 3605bd153b8ede25fdf3bb1dd300016dca2900b5 /source/blender/blenkernel/intern/fcurve.c | |
parent | f0ac7294fafcd12abc83aa706f41af909ddad96d (diff) |
A simpler fix for the "clive" part of T39207 without the precision granularity risks
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 8121293691b..5d13c485a71 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -2047,15 +2047,8 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime prevbezt = (a > 0) ? bezt - 1 : bezt; /* use if the key is directly on the frame, rare cases this is needed else we get 0.0 instead. */ - /* XXX: the threshold for "exact" is BEZT_BINARYSEARCH_THRESH (currently 0.01), while older versions - * used a finer threshold (1e-8 or "SMALL_NUMBER"). In order to avoid problems introduced in - * 2aff243 (such as those mentioned in T39207 - specifically, in the "Clive.blend" example), - * we need a coarser threshold to avoid this slipping right through. However, 0.01 may be - * too much when dealing with some driver curves, so we'll need to revisit this in due course - * when problematic files arise. - * -- Aligorith (2014Mar19) - */ - if ((fabsf(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) || (exact)) { + /* XXX: consult T39207 for examples of files where failure of this check can cause issues */ + if ((fabsf(bezt->vec[1][0] - evaltime) < SMALL_NUMBER) || (a == 0)) { cvalue = bezt->vec[1][1]; } /* evaltime occurs within the interval defined by these two keyframes */ |