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')
-rw-r--r--source/blender/blenloader/intern/readfile.c7
-rw-r--r--source/blender/blenloader/intern/writefile.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 95fa4018392..b0f1d3f37ed 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5021,6 +5021,8 @@ static void lib_link_scene(FileData *fd, Main *main)
RigidBodyWorld *rbw = sce->rigidbody_world;
if (rbw->group)
rbw->group = newlibadr(fd, sce->id.lib, rbw->group);
+ if (rbw->effector_weights)
+ rbw->effector_weights->group = newlibadr(fd, sce->id.lib, rbw->effector_weights->group);
}
if (sce->nodetree) {
@@ -5296,6 +5298,11 @@ static void direct_link_scene(FileData *fd, Scene *sce)
rbw->physics_world = NULL;
rbw->objects = NULL;
rbw->numbodies = 0;
+
+ /* set effector weights */
+ rbw->effector_weights = newdataadr(fd, rbw->effector_weights);
+ if (!rbw->effector_weights)
+ rbw->effector_weights = BKE_add_effector_weights(NULL);
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index a52e4e28981..da50a05a3d9 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2306,6 +2306,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
/* writing RigidBodyWorld data to the blend file */
if (sce->rigidbody_world) {
writestruct(wd, DATA, "RigidBodyWorld", 1, sce->rigidbody_world);
+ writestruct(wd, DATA, "EffectorWeights", 1, sce->rigidbody_world->effector_weights);
}
sce= sce->id.next;