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:
authorTon Roosendaal <ton@blender.org>2008-10-09 18:28:17 +0400
committerTon Roosendaal <ton@blender.org>2008-10-09 18:28:17 +0400
commit46ee3ee54cc948eee2697ca265352e830d900e36 (patch)
treed01cc2e1cc6a05da23813e6b81bfb2344a3c3cc9 /source/blender/blenkernel/intern/key.c
parent44c01e2621b2a7dcd27e9d3a6d85ba2ae1bdddae (diff)
Bugfix #11712
Definitely one of the oldest bugs ever (1995 or so). Case is a path (child on path, or deformer, or motion modifier) where the child is far away from path (300 units or so). In that case you can see the path jumping to another position a bit after a few frames. Reason: For interpolating path positions, I was using bspline code still having a very ancient constant 0.1666f. Floats have higher precision, like 0.16666666. That solved it :)
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r--source/blender/blenkernel/intern/key.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index dd6c7ddacd2..755a41ec4b2 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -284,10 +284,10 @@ void set_four_ipo(float d, float *data, int type)
}
else if(type==KEY_BSPLINE) {
- data[0]= -0.1666f*d3 +0.5f*d2 -0.5f*d +0.16666f;
- data[1]= 0.5f*d3 -d2 +0.6666f;
- data[2]= -0.5f*d3 +0.5f*d2 +0.5f*d +0.1666f;
- data[3]= 0.1666f*d3 ;
+ data[0]= -0.16666666f*d3 +0.5f*d2 -0.5f*d +0.16666666f;
+ data[1]= 0.5f*d3 -d2 +0.6666666f;
+ data[2]= -0.5f*d3 +0.5f*d2 +0.5f*d +0.16666666f;
+ data[3]= 0.16666666f*d3 ;
}
}
}
@@ -313,10 +313,10 @@ void set_afgeleide_four_ipo(float d, float *data, int type)
}
else if(type==KEY_BSPLINE) {
- data[0]= -0.1666f*3.0f*d2 +d -0.5f;
+ data[0]= -0.16666666f*3.0f*d2 +d -0.5f;
data[1]= 1.5f*d2 -2.0f*d;
data[2]= -1.5f*d2 +d +0.5f;
- data[3]= 0.1666f*3.0f*d2 ;
+ data[3]= 0.16666666f*3.0f*d2 ;
}
}
}