softbodies

nice little 'debug' feature
SHIFT_ESC breaks baking without throwing away the baked keys
so you can check the solution calculated so far
baked sb replay checks for NULL pointers in keys -> motion will stop there
even saving and loading to file works here,
but i would not expect it to do so
humm .. may be i'll add a dirty flag for that
This commit is contained in:
Jens Ole Wund 2006-11-23 20:31:46 +00:00
parent b1f787715a
commit 40c5b56707
2 changed files with 2 additions and 2 deletions

@ -2920,7 +2920,7 @@ static int softbody_baked_step(Object *ob, float framenr, float (*vertexCos)[3],
fac= ((cfra-sfra)/dfra) - (float)ofs1;
CLAMP(fac, 0.0, 1.0);
set_four_ipo(fac, data, KEY_BSPLINE);
if (key0&&key1&&key2&&key3) // may be null because we SHIFT_ESCAPED
for(a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++, key0++, key1++, key2++, key3++) {
bp->pos[0]= data[0]*key0->vec[0] + data[1]*key1->vec[0] + data[2]*key2->vec[0] + data[3]*key3->vec[0];
bp->pos[1]= data[0]*key0->vec[1] + data[1]*key1->vec[1] + data[2]*key2->vec[1] + data[3]*key3->vec[1];

@ -1435,7 +1435,7 @@ void softbody_bake(Object *ob)
}
}
if(didbreak) {
if((didbreak)&&(G.qual!=LR_SHIFTKEY)) {
if(ob)
sbObjectToSoftbody(ob); // free bake
else {