[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57987] trunk/blender/source/blender/ blenkernel/intern/rigidbody.c: rigidbody: Remove constraint when removing one of it's objects
Sergej Reich
sergej.reich at googlemail.com
Thu Jul 4 10:52:25 CEST 2013
Revision: 57987
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57987
Author: sergof
Date: 2013-07-04 08:52:24 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
rigidbody: Remove constraint when removing one of it's objects
This is not the nicest behaviour but trying to keep both bullet and
blender side objects in sync breaks in this case.
There might be a better soluion but this avoids crashes for now.
Fixes: [#35995] Delete crash on specific scene (Physics)
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/rigidbody.c
Modified: trunk/blender/source/blender/blenkernel/intern/rigidbody.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/rigidbody.c 2013-07-04 08:47:42 UTC (rev 57986)
+++ trunk/blender/source/blender/blenkernel/intern/rigidbody.c 2013-07-04 08:52:24 UTC (rev 57987)
@@ -914,12 +914,10 @@
if (obt && obt->rigidbody_constraint) {
rbc = obt->rigidbody_constraint;
if (rbc->ob1 == ob) {
- rbc->ob1 = NULL;
- rbc->flag |= RBC_FLAG_NEEDS_VALIDATE;
+ BKE_rigidbody_remove_constraint(scene, obt);
}
if (rbc->ob2 == ob) {
- rbc->ob2 = NULL;
- rbc->flag |= RBC_FLAG_NEEDS_VALIDATE;
+ BKE_rigidbody_remove_constraint(scene, obt);
}
}
}
More information about the Bf-blender-cvs
mailing list