Using stride-bone in an NLA, on a path without speed Ipo, didn't correct
the case when an action starts on a non-zero value.
Patch provided by Roland Hess. Thanks!
This commit is contained in:
Ton Roosendaal 2006-04-10 10:31:11 +00:00
parent 3be0c804ae
commit 2c42d342d9

@ -942,7 +942,8 @@ static void do_nla(Object *ob, int blocktype)
ctime= bsystem_time(ob, parent, scene_cfra, 0.0); ctime= bsystem_time(ob, parent, scene_cfra, 0.0);
if(calc_ipo_spec(cu->ipo, CU_SPEED, &ctime)==0) { if(calc_ipo_spec(cu->ipo, CU_SPEED, &ctime)==0) {
ctime /= cu->pathlen; /* correct for actions not starting on zero */
ctime= (ctime - strip->actstart)/cu->pathlen;
CLAMP(ctime, 0.0, 1.0); CLAMP(ctime, 0.0, 1.0);
} }
pdist = ctime*cu->path->totdist; pdist = ctime*cu->path->totdist;