[Bf-blender-cvs] [fa859b0d728] fracture_modifier: only break constraints with threshold >= 0

Martin Felke noreply at git.blender.org
Tue Sep 12 12:36:31 CEST 2017


Commit: fa859b0d728349d668b9168d1897f07d822bb819
Author: Martin Felke
Date:   Tue Sep 12 12:36:00 2017 +0200
Branches: fracture_modifier
https://developer.blender.org/rBfa859b0d728349d668b9168d1897f07d822bb819

only break constraints with threshold >= 0

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

M	source/blender/blenkernel/intern/rigidbody.c

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index eb9ddae27a1..f74202095be 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2426,7 +2426,10 @@ static void activateRigidbody(RigidBodyOb* rbo, RigidBodyWorld *UNUSED(rbw), Mes
 					con->flag |= RBC_FLAG_PLASTIC_ACTIVE;
 				}
 
-				RB_constraint_set_enabled(con->physics_constraint, false);
+				if (con->breaking_threshold >= 0)
+				{
+					RB_constraint_set_enabled(con->physics_constraint, false);
+				}
 			}
 		}
 	}



More information about the Bf-blender-cvs mailing list