[Bf-blender-cvs] [22ab652] master: A simpler fix for the "clive" part of T39207 without the precision granularity risks
Joshua Leung
noreply at git.blender.org
Wed Mar 19 14:24:02 CET 2014
Commit: 22ab652bb095d1ed69927ab76010fc0e6186799f
Author: Joshua Leung
Date: Thu Mar 20 02:22:42 2014 +1300
https://developer.blender.org/rB22ab652bb095d1ed69927ab76010fc0e6186799f
A simpler fix for the "clive" part of T39207 without the precision granularity risks
===================================================================
M source/blender/blenkernel/intern/fcurve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 8121293..5d13c48 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 */
More information about the Bf-blender-cvs
mailing list