[Bf-blender-cvs] [7befec2] fracture_modifier: fix for loading splitshards to island blends and clusters properly

Martin Felke noreply at git.blender.org
Thu Mar 31 11:27:26 CEST 2016


Commit: 7befec292bf0a2a2383fba1c13798c056a8b2043
Author: Martin Felke
Date:   Thu Mar 31 11:27:06 2016 +0200
Branches: fracture_modifier
https://developer.blender.org/rB7befec292bf0a2a2383fba1c13798c056a8b2043

fix for loading splitshards to island blends and clusters properly

was necessary to skip "empty shards" properly and keep cluster index

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3d19d58..0f69752 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5085,7 +5085,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;
+	//mi->particle_index = -1;
 }
 
 static int initialize_meshisland(FractureModifierData* fmd, MeshIsland** mii, MVert* mverts, int vertstart,
@@ -5261,7 +5261,15 @@ static void load_fracture_modifier(FileData* fd, FractureModifierData *fmd)
 			/* re-init cached verts here... */
 			mverts = CDDM_get_verts(fmd->visible_mesh_cached);
 
-			i = 0;
+			if (fmd->shards_to_islands)
+			{
+				i = fm->shard_count;
+			}
+			else
+			{
+				i = 0;
+			}
+
 			for (mi = fmd->meshIslands.first; mi; mi = mi->next) {
 				Shard *sh = NULL;
 				sh = shards[i]; //skip "empty" shards




More information about the Bf-blender-cvs mailing list