diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-04-15 19:08:01 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-04-15 19:23:51 +0400 |
commit | 76dd3db3041e7ab60b79f4c4b9aadd344d66a4c0 (patch) | |
tree | b0ca4f6c6a476d8e858507a9344ba5aeff9cdc58 /source | |
parent | 09e5aa5156486585b3d23f52f927db744fb9a055 (diff) |
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)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 046bb8e0e8d..0e86be9b97c 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 0f3a2a668bf..fc74ae5fe60 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) */ |