[Bf-blender-cvs] [f168ba8] fracture_modifier: fix: passive vertexgroup was ignored

Martin Felke noreply at git.blender.org
Sun Apr 19 10:04:34 CEST 2015


Commit: f168ba85a98311f8a6ede22b7d256bcfb9c5e318
Author: Martin Felke
Date:   Sun Apr 19 09:54:22 2015 +0200
Branches: fracture_modifier
https://developer.blender.org/rBf168ba85a98311f8a6ede22b7d256bcfb9c5e318

fix: passive vertexgroup was ignored

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

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

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

diff --git a/source/blender/modifiers/intern/MOD_fracture.c b/source/blender/modifiers/intern/MOD_fracture.c
index cdd7e10..104e9fc 100644
--- a/source/blender/modifiers/intern/MOD_fracture.c
+++ b/source/blender/modifiers/intern/MOD_fracture.c
@@ -1439,7 +1439,7 @@ static void do_rigidbody(FractureModifierData *fmd, MeshIsland* mi, Object* ob,
 
 static short do_vert_index_map(FractureModifierData *fmd, MeshIsland *mi)
 {
-	short rb_type = RBO_TYPE_ACTIVE;
+	short rb_type = mi->ground_weight > 0.5f ? RBO_TYPE_PASSIVE : RBO_TYPE_ACTIVE;
 
 	if (fmd->vert_index_map && fmd->dm_group && fmd->cluster_count == 0 && mi->vertex_indices)
 	{
@@ -2670,6 +2670,7 @@ static void do_island_from_shard(FractureModifierData *fmd, Object *ob, Shard* s
 	mi->participating_constraints = NULL;
 	mi->participating_constraint_count = 0;
 	mi->thresh_weight = 0;
+	mi->ground_weight = 0;
 	mi->vertex_count = s->totvert;
 
 	do_verts_weights(fmd, s, mi, vertstart, thresh_defgrp_index, ground_defgrp_index);




More information about the Bf-blender-cvs mailing list