[Bf-blender-cvs] [2c58498] fracture_modifier: fix: properly initialize cluster indices of mesh islands, failing to do so caused different activation behavior when triggering

Martin Felke noreply at git.blender.org
Thu Jul 23 17:48:35 CEST 2015


Commit: 2c58498e6d228bf49cf58061427c43d9489f4b7a
Author: Martin Felke
Date:   Thu Jul 23 17:47:02 2015 +0200
Branches: fracture_modifier
https://developer.blender.org/rB2c58498e6d228bf49cf58061427c43d9489f4b7a

fix: properly initialize cluster indices of mesh islands, failing to do so caused different activation behavior when triggering

===================================================================

M	source/blender/blenloader/intern/readfile.c
M	source/blender/modifiers/intern/MOD_fracture.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 47378cc..84b1c3d 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4757,6 +4757,7 @@ static void read_meshIsland(FileData *fd, MeshIsland **address)
 	/* will be refreshed on the fly */
 	mi->participating_constraint_count = 0;
 	mi->participating_constraints = NULL;
+	mi->particle_index = -1;
 }
 
 /*inlined from MOD_fracture.c*/
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 3902ff4..148019d 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -1587,6 +1587,7 @@ static float do_setup_meshisland(FractureModifierData *fmd, Object *ob, int totv
 		mi->rots = MEM_mallocN(sizeof(float)*4* mi->frame_count, "mi->rots");
 	}
 
+	mi->particle_index = -1;
 	mi->thresh_weight = 0;
 	mi->vertices = verts; /*those are temporary only !!! */
 	mi->vertco = MEM_mallocN(sizeof(float) * 3 * totvert, "mi->vertco");




More information about the Bf-blender-cvs mailing list