[Bf-blender-cvs] [7a37dbbaeb6] fracture_modifier: fix attempt for binding to particles
Martin Felke
noreply at git.blender.org
Mon Jun 17 11:38:12 CEST 2019
Commit: 7a37dbbaeb66ed13f9f766a6e440cf8443f0cda9
Author: Martin Felke
Date: Sat Jun 15 20:05:27 2019 +0200
Branches: fracture_modifier
https://developer.blender.org/rB7a37dbbaeb66ed13f9f766a6e440cf8443f0cda9
fix attempt for binding to particles
===================================================================
M source/blender/blenkernel/intern/fracture.c
M source/blender/blenkernel/intern/rigidbody.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index 971e0fa0e5c..a7bae68ca67 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -4234,7 +4234,11 @@ void BKE_read_animated_loc_rot(FractureModifierData *fmd, Object *ob, bool do_bi
if (fmd->anim_mesh_rot)
{
- //mul_qt_qtqt(quat, ob_quat, quat);
+ if (quats) {
+ //if rotations are changed, re-bind the object to fix
+ mul_qt_qtqt(quat, ob_quat, quat);
+ }
+
mul_qt_qtqt(quat, anim_quat, quat);
copy_qt_qt(mi->rigidbody->orn, quat);
}
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index c50d1a93e93..2f4e756db73 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -2181,13 +2181,13 @@ void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime)
if (rbw == NULL)
return;
- BLI_mutex_lock(&modifier_lock);
+ //BLI_mutex_lock(&modifier_lock);
for (md = ob->modifiers.first; md; md = md->next) {
modFound = do_sync_modifier(md, ob, rbw, ctime);
if (modFound)
break;
}
- BLI_mutex_unlock(&modifier_lock);
+ //BLI_mutex_unlock(&modifier_lock);
if (!modFound)
{
More information about the Bf-blender-cvs
mailing list