When adding keyframes to a very-short action scaled to long-lengths in the
NLA editor, exisiting keyframes would disappear. The culprit was a very large
threshold value used to cull duplicate keyframes. This bug was even present
in 2.42(a).

Although this fixes the bug, further work is needed on preventing future cases
of badly scaled actions. Actions with length of 0.9 frames representing motion
of 200 frame ranges is not on.
This commit is contained in:
Joshua Leung 2007-01-10 08:33:05 +00:00
parent 8cfc675b5a
commit 253b98d98c

@ -1916,7 +1916,7 @@ void insert_vert_ipo(IpoCurve *icu, float x, float y)
for(a=0; a<=icu->totvert; a++, bezt++) {
/* no double points */
if(a<icu->totvert && (bezt->vec[1][0]>x-IPOTHRESH && bezt->vec[1][0]<x+IPOTHRESH)) {
if(a<icu->totvert && IS_EQ(bezt->vec[1][0], x)) {
*(bezt)= beztr;
break;
}