[Bf-blender-cvs] [3cc1faf1186] fracture_modifier: when sorting objects, keep mi->object_index aligned

Martin Felke noreply at git.blender.org
Sun Feb 25 19:48:19 CET 2018


Commit: 3cc1faf11868facf8d412298872fc0ce958e9e08
Author: Martin Felke
Date:   Sun Feb 25 19:48:05 2018 +0100
Branches: fracture_modifier
https://developer.blender.org/rB3cc1faf11868facf8d412298872fc0ce958e9e08

when sorting objects, keep mi->object_index aligned

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

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

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index 2a5d366c302..45255a0f7ac 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1714,6 +1714,10 @@ void BKE_rigidbody_update_ob_array(RigidBodyWorld *rbw, bool do_bake_correction)
 				if (mi->rigidbody && !do_bake_correction) {
 					//as we search by id now in the pointcache, we set the id here too
 					mi->rigidbody->meshisland_index = counter;
+					if (mi->object_index != -1)
+					{
+						mi->object_index = i;
+					}
 				}
 				counter++;
 				j++;



More information about the Bf-blender-cvs mailing list