[Bf-blender-cvs] [603b9df] fracture_modifier: dont suppress undo save/load with dynamic any more
Martin Felke
noreply at git.blender.org
Wed Mar 30 15:18:38 CEST 2016
Commit: 603b9dfbe9cd97ade958dd952ca7c850f19e3a8c
Author: Martin Felke
Date: Wed Mar 30 15:17:54 2016 +0200
Branches: fracture_modifier
https://developer.blender.org/rB603b9dfbe9cd97ade958dd952ca7c850f19e3a8c
dont suppress undo save/load with dynamic any more
this seems a bit more stable, but does crash occasionally too, and may even
corrupt the blend. Workaround, open with official blender and FM is gone, save
and blend should be usable again.
===================================================================
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4acb213..3d19d58 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5304,7 +5304,7 @@ static void load_fracture_modifier(FileData* fd, FractureModifierData *fmd)
MEM_freeN(shards);
}
- else if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC && !fd->memfile)
+ else if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC /*&& !fd->memfile*/)
{
ShardSequence *ssq = NULL;
MeshIslandSequence *msq = NULL;
@@ -5379,15 +5379,6 @@ static void load_fracture_modifier(FileData* fd, FractureModifierData *fmd)
}
}
-#if 0
- if (fmd->fracture_mode != MOD_FRACTURE_EXTERNAL)
- {
- fmd->refresh_constraints = true;
- fmd->meshConstraints.first = NULL;
- fmd->meshConstraints.last = NULL;
- }
-#endif
-
fmd->refresh_images = true;
fmd->auto_execute = autoexec;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 8fec906..e0ffac1 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1710,6 +1710,7 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
FracMesh* fm = fmd->frac_mesh;
MeshIsland *mi;
Shard *s;
+ RigidBodyShardCon *con;
bool mode = fmd->fracture_mode == MOD_FRACTURE_PREFRACTURED ||
fmd->fracture_mode == MOD_FRACTURE_EXTERNAL;
@@ -1733,18 +1734,14 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
write_meshIsland(wd, mi);
}
- //if (fmd->fracture_mode == MOD_FRACTURE_EXTERNAL)
+ for (con = fmd->meshConstraints.first; con; con = con->next)
{
- RigidBodyShardCon *con;
- for (con = fmd->meshConstraints.first; con; con = con->next)
- {
- writestruct(wd, DATA, "RigidBodyShardCon", 1, con);
- }
+ writestruct(wd, DATA, "RigidBodyShardCon", 1, con);
}
}
}
}
- else if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC && !wd->current)
+ else if (fmd->fracture_mode == MOD_FRACTURE_DYNAMIC /*&& !wd->current*/)
{
ShardSequence *ssq;
MeshIslandSequence *msq;
More information about the Bf-blender-cvs
mailing list