Another bugreport, this time Basse: in NLA a position could sometimes be

set whilst the actual time was 1 frame after the strip. Appeared to be
a rounding error that didnt show in OSX.

Previously I added a threshold, to make sure strips are included when the
current frame is exactly on the end. That threshold now is smaller, and
I also made the fmod() to be done only on repeating strips.
This commit is contained in:
Ton Roosendaal 2005-11-22 17:58:10 +00:00
parent 17c26f4ccb
commit 6c619b235c

@ -816,7 +816,7 @@ static void do_nla(Object *ob, int blocktype)
actlength = strip->actend-strip->actstart;
striptime = (G.scene->r.cfra-(strip->start)) / length;
stripframe = (G.scene->r.cfra-(strip->start)) ;
if (striptime>=0.0){
if(blocktype==ID_AR)
@ -870,13 +870,15 @@ static void do_nla(Object *ob, int blocktype)
}
}
}
/* Handle repeat, we add 1 frame extra to make sure the last frame is included */
else if (striptime < 1.0f + 1.0f/length) {
/* Handle repeat, we add 0.1 frame extra to make sure the last frame is included */
else if (striptime < 1.0f + 0.1f/length) {
/* Mod to repeat */
striptime*= strip->repeat;
striptime = (float)fmod (striptime, 1.0f + 1.0f/length);
if(strip->repeat!=1.0f) {
striptime*= strip->repeat;
striptime = (float)fmod (striptime, 1.0f + 0.1f/length);
}
frametime = (striptime * actlength) + strip->actstart;
frametime= nla_time(frametime, (float)strip->repeat);