[Bf-blender-cvs] [d74d156] fracture_modifier: fix for rotational and splinter (with splitshards) issues in dynamic fracture

Martin Felke noreply at git.blender.org
Tue Dec 13 11:25:36 CET 2016


Commit: d74d156c96778eca9c2df22b214211018b66919d
Author: Martin Felke
Date:   Tue Dec 13 11:25:11 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rBd74d156c96778eca9c2df22b214211018b66919d

fix for rotational and splinter (with splitshards) issues in dynamic fracture

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

M	source/blender/blenkernel/intern/fracture.c
M	source/blender/modifiers/intern/MOD_fracture.c

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

diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 0958a89..1024a8b 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -2160,7 +2160,7 @@ void BKE_match_vertex_coords(MeshIsland* mi, MeshIsland *par, Object *ob, int fr
 	{
 		invert_qt_qt(qrot, par->rot);
 		mul_qt_qtqt(qrot, rot, qrot);
-		mul_qt_qtqt(qrot, quat, qrot);
+		mul_qt_qtqt(qrot, iquat, qrot);
 	}
 	else
 	{
diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index 73c3184..35e2fcb 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -1593,11 +1593,11 @@ static void do_fracture(FractureModifierData *fmd, ShardID id, Object *obj, Deri
 		Shard *s = NULL;
 		float cent[3];
 
+		arrange_shard(fmd, id, true, cent);
+
 		/*splinters... just global axises and a length, for rotation rotate the object */
 		s = do_splinters(fmd, points, &mat, id, dm);
 
-		arrange_shard(fmd, id, true, cent);
-
 		mat_index = do_materials(fmd, obj);
 		mat_index = mat_index > 0 ? mat_index - 1 : mat_index;
 
@@ -1676,10 +1676,7 @@ static void do_fracture(FractureModifierData *fmd, ShardID id, Object *obj, Deri
 		BKE_fracture_create_dm(fmd, true);
 		fmd->shards_to_islands = temp;
 
-		if (!s)
-		{
-			cleanup_splinters(fmd, mat, s, dm);
-		}
+		cleanup_splinters(fmd, mat, s, dm);
 
 		if (!fmd->auto_execute && fmd->execute_threaded) {
 			fmd->reset_shards = false;




More information about the Bf-blender-cvs mailing list