[Bf-blender-cvs] [a99e8401517] fracture_modifier: crash fix and minor tweaks for external mode (setting expected defaults)

Martin Felke noreply at git.blender.org
Tue Jun 13 23:28:34 CEST 2017


Commit: a99e840151766d5c1d79e69af2a3bebbc2bef878
Author: Martin Felke
Date:   Tue Jun 13 23:28:24 2017 +0200
Branches: fracture_modifier
https://developer.blender.org/rBa99e840151766d5c1d79e69af2a3bebbc2bef878

crash fix and minor tweaks for external mode (setting expected defaults)

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

M	source/blender/blenkernel/intern/fracture.c
M	source/blender/blenkernel/intern/rigidbody.c
M	source/blender/makesrna/intern/rna_fracture_api.c

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

diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 9120554ec5b..63d649b466a 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -3313,8 +3313,8 @@ RigidBodyShardCon *BKE_fracture_mesh_islands_connect(FractureModifierData *fmd,
 		rbsc->flag &= ~RBC_FLAG_USE_BREAKING;
 
 		/* also delete all other "default" flags here, let them being overriden from python too */
-		rbsc->flag &= ~RBC_FLAG_ENABLED;
-		rbsc->flag &= ~RBC_FLAG_DISABLE_COLLISIONS;
+		//rbsc->flag &= ~RBC_FLAG_ENABLED;
+		rbsc->flag |= RBC_FLAG_DISABLE_COLLISIONS;
 
 #if 0
 		/* and dont allow to let constrained objects collide per default, as with regular constraints */
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index a0949e3c1d7..7adf1779626 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -4867,8 +4867,11 @@ void BKE_rigidbody_rebuild_world(Scene *scene, float ctime)
 
 	if (ctime == -1)
 	{
-		/*hack to be able to update the simulation data after loading from FM*/
-		rigidbody_update_simulation(scene, rbw, true);
+		if (rbw && rbw->group)
+		{
+			/*hack to be able to update the simulation data after loading from FM*/
+			rigidbody_update_simulation(scene, rbw, true);
+		}
 		return;
 	}
 
diff --git a/source/blender/makesrna/intern/rna_fracture_api.c b/source/blender/makesrna/intern/rna_fracture_api.c
index b75fed9b723..6a10872f66a 100644
--- a/source/blender/makesrna/intern/rna_fracture_api.c
+++ b/source/blender/makesrna/intern/rna_fracture_api.c
@@ -613,7 +613,7 @@ static void rna_def_mesh_constraint(BlenderRNA *brna)
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", RBC_FLAG_DISABLE_COLLISIONS);
 	RNA_def_property_boolean_funcs(prop, NULL, "rna_MeshCon_disable_collisions_set");
 	RNA_def_property_ui_text(prop, "Disable Collisions", "Disable collisions between constrained rigid bodies");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
+	//RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
 	/* Breaking Threshold */
 	prop = RNA_def_property(srna, "use_breaking", PROP_BOOLEAN, PROP_NONE);




More information about the Bf-blender-cvs mailing list