[Bf-blender-cvs] [76dd3db] master: Move binary-search threshold used for FCurves to BKE_fcurve.h header

Joshua Leung noreply at git.blender.org
Tue Apr 15 17:25:01 CEST 2014


Commit: 76dd3db3041e7ab60b79f4c4b9aadd344d66a4c0
Author: Joshua Leung
Date:   Wed Apr 16 03:08:01 2014 +1200
https://developer.blender.org/rB76dd3db3041e7ab60b79f4c4b9aadd344d66a4c0

Move binary-search threshold used for FCurves to BKE_fcurve.h header

Since this is now pretty much the de-facto "minimum distance between keyframes",
we might as well expose this in this header so that other places which need similar
thresholds can perform similar checks (needed for my next commit)

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

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

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

diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index 046bb8e..0e86be9 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -197,7 +197,10 @@ int BKE_fcm_envelope_find_index(struct FCM_EnvelopeData *array, float frame, int
 
 /* ************** F-Curves API ******************** */
 
-/* -------- Data Managemnt  --------  */
+/* threshold for binary-searching keyframes - threshold here should be good enough for now, but should become userpref */
+#define BEZT_BINARYSEARCH_THRESH   0.01f /* was 0.00001, but giving errors */
+
+/* -------- Data Management  --------  */
 
 void free_fcurve(struct FCurve *fcu);
 struct FCurve *copy_fcurve(struct FCurve *fcu);
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 0f3a2a6..fc74ae5 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -351,10 +351,6 @@ FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, bAction
 
 /* ----------------- Finding Keyframes/Extents -------------------------- */
 
-/* threshold for binary-searching keyframes - threshold here should be good enough for now, but should become userpref */
-#define BEZT_BINARYSEARCH_THRESH   0.01f /* was 0.00001, but giving errors */
-
-
 /* Binary search algorithm for finding where to insert BezTriple, with optional argument for precision required.
  * Returns the index to insert at (data already at that index will be offset if replace is 0)
  */




More information about the Bf-blender-cvs mailing list