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.c15
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index ee4cb66a6e0..330ae84f922 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3051,11 +3051,14 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
clmd->sim_parms= newdataadr(fd, clmd->sim_parms);
clmd->coll_parms= newdataadr(fd, clmd->coll_parms);
- clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_LOADED;
- clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE;
-
- if(clmd->sim_parms->presets > 10)
- clmd->sim_parms->presets = 0;
+ if(clmd->sim_parms)
+ {
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_LOADED;
+ clmd->sim_parms->flags &= ~CLOTH_SIMSETTINGS_FLAG_EDITMODE;
+
+ if(clmd->sim_parms->presets > 10)
+ clmd->sim_parms->presets = 0;
+ }
}
else if (md->type==eModifierType_Collision) {
@@ -3080,7 +3083,7 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
collmd->current_v = NULL;
collmd->time = -1;
collmd->numverts = 0;
- collmd->tree = NULL;
+ collmd->bvh = NULL;
collmd->mfaces = NULL;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index a4c91d77f5e..7979dd0b33f 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -859,8 +859,8 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
else if(md->type==eModifierType_Cloth) {
ClothModifierData *clmd = (ClothModifierData*) md;
- writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms);
- writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms);
+ writestruct(wd, DATA, "ClothSimSettings", 1, clmd->sim_parms);
+ writestruct(wd, DATA, "ClothCollSettings", 1, clmd->coll_parms);
}
else if (md->type==eModifierType_Collision) {