diff options
author | Ton Roosendaal <ton@blender.org> | 2006-03-08 20:00:48 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-03-08 20:00:48 +0300 |
commit | 5d1f64fc19e677e5a226c73cf883afe695578ed7 (patch) | |
tree | 3bbfbb38940d9d0f7070d858cd3acc6d5a3d7804 /source | |
parent | 2858229e9fe8c703faf637608415b415c53b1d5d (diff) |
Bugfix: Sofbody baking included the 'start frame' for the object in
calculus, causing empty keys in the bake, and crashes.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 0bbd7d3496d..79418ed92eb 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1655,7 +1655,9 @@ static void softbody_baked_add(Object *ob, float framenr) /* convert cfra time to system time */ sfra= (float)sb->sfra; + fac1= ob->sf; ob->sf= 0.0f; /* disable startframe */ cfra= bsystem_time(ob, NULL, framenr, 0.0); + ob->sf= fac1; efra= (float)sb->efra; dfra= (float)sb->interval; @@ -1673,7 +1675,7 @@ static void softbody_baked_add(Object *ob, float framenr) /* now find out if we have to store a key */ /* offset in keys array */ - if(cfra==efra) { + if(cfra>=(efra)) { ofs1= sb->totkey-1; fac1= 0.0; } |