[Bf-blender-cvs] [d690c76e56c] temp-sybren-anim-cleanup: Cleanup: Animation, removed impossible-to-reach code

Sybren A. Stüvel noreply at git.blender.org
Fri Feb 7 17:52:04 CET 2020


Commit: d690c76e56cfc8858a7a31333716a87704c51508
Author: Sybren A. Stüvel
Date:   Fri Feb 7 17:47:00 2020 +0100
Branches: temp-sybren-anim-cleanup
https://developer.blender.org/rBd690c76e56cfc8858a7a31333716a87704c51508

Cleanup: Animation, removed impossible-to-reach code

While fixing T39207 @aligorith added a threshold to the binary search
function that's used to find the closest keyframe. Since that threshold
is larger than the threshold used in the now-removed code, the condition
in that code will evaluate to true anyway, and thus it can be removed.

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

M	source/blender/blenkernel/intern/fcurve.c

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

diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 4c5644c130b..6ced863f0de 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -2813,13 +2813,6 @@ static float fcurve_eval_between_keyframes(const FCurve *fcu,
   bezt = bezts + bezt_index;
   prevbezt = (bezt_index > 0) ? (bezt - 1) : bezt;
 
-  /* TODO(Sybren): remove the below code, as in this case the binary search has
-   * already marked the result as an exact match. */
-  const float eps = 1.e-8f;
-  if (fabsf(bezt->vec[1][0] - evaltime) < eps) {
-    return bezt->vec[1][1];
-  }
-
   /* evaltime should occur within the interval defined by these two keyframes. */
   if (evaltime < prevbezt->vec[1][0] || bezt->vec[1][0] < evaltime) {
     if (G.debug & G_DEBUG) {



More information about the Bf-blender-cvs mailing list