On "Add duplicate object" the softbody baking info wasn't freed.

Note: currently the 'baking' stores the entire animation system, which
makes further animation refining (or duplicating) useless for a Baked
SoftBody. You can even delete the entire anim system.
This can be presented as a feature too (saves slow armature stuff).
However, I might check on a 'relative' bake too.
This commit is contained in:
Ton Roosendaal 2005-05-12 14:00:12 +00:00
parent 71a2d40b00
commit aca394e341
2 changed files with 5 additions and 0 deletions

@ -758,6 +758,9 @@ SoftBody *copy_softbody(SoftBody *sb)
sbn->bspring= NULL;
sbn->ctime= 0.0f;
sbn->keys= NULL;
sbn->totkey= sbn->totpointkey= 0;
return sbn;
}

@ -1189,6 +1189,8 @@ void sbObjectReset(Object *ob)
int a;
if(sb==NULL) return;
if(sb->keys && sb->totkey) return; // only as cpu time saver
sb->ctime= bsystem_time(ob, NULL, (float)G.scene->r.cfra, 0.0);
object_update_softbody(ob);