Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e7bca4c7e5b..146494e6196 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1816,9 +1816,13 @@ static void write_object(WriteData *wd, Object *ob)
write_motionpath(wd, ob->mpath);
writestruct(wd, DATA, PartDeflect, 1, ob->pd);
- writestruct(wd, DATA, SoftBody, 1, ob->soft);
if (ob->soft) {
- write_pointcaches(wd, &ob->soft->ptcaches);
+ /* Set deprecated pointers to prevent crashes of older Blenders */
+ ob->soft->pointcache = ob->soft->shared->pointcache;
+ ob->soft->ptcaches = ob->soft->shared->ptcaches;
+ writestruct(wd, DATA, SoftBody, 1, ob->soft);
+ writestruct(wd, DATA, SoftBody_Shared, 1, ob->soft->shared);
+ write_pointcaches(wd, &(ob->soft->shared->ptcaches));
writestruct(wd, DATA, EffectorWeights, 1, ob->soft->effector_weights);
}