Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArno Mayrhofer <azrael3000>2019-04-09 00:54:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-09 00:54:37 +0300
commit2a79e34631303edbf1853c5cdf81a04333d094a0 (patch)
tree6fd7215c1566f2d2b3c04ac7825f709eb54579c0 /source/blender/blenkernel/intern/key.c
parent7655b32999a0720ea9fcba6610bc9f4fbb56de25 (diff)
Fix T63326: absolute shape keys inserted from Python in wrong order.
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r--source/blender/blenkernel/intern/key.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index f85964f76bc..de1c3976b7b 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1497,7 +1497,9 @@ KeyBlock *BKE_keyblock_add_ctime(Key *key, const char *name, const bool do_force
if (!do_force && (key->type != KEY_RELATIVE)) {
KeyBlock *it_kb;
for (it_kb = key->block.first; it_kb; it_kb = it_kb->next) {
- if (it_kb->pos == cpos) {
+ /* Use epsilon to avoid floating point precision issues.
+ * 1e-3 because the position is stored as frame * 1e-2. */
+ if (compare_ff(it_kb->pos, cpos, 1e-3f)) {
return kb;
}
}