[Bf-blender-cvs] [8df4ac8a848] fracture_modifier: fix attempt for previous rotation fix with bound objects
Martin Felke
noreply at git.blender.org
Thu Jan 10 21:57:03 CET 2019
Commit: 8df4ac8a848c5189b31003dfe3e02242ae57afb4
Author: Martin Felke
Date: Thu Jan 10 21:56:48 2019 +0100
Branches: fracture_modifier
https://developer.blender.org/rB8df4ac8a848c5189b31003dfe3e02242ae57afb4
fix attempt for previous rotation fix with bound objects
===================================================================
M source/blender/blenkernel/intern/fracture.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fracture.c b/source/blender/blenkernel/intern/fracture.c
index c32fb2c638b..971e0fa0e5c 100644
--- a/source/blender/blenkernel/intern/fracture.c
+++ b/source/blender/blenkernel/intern/fracture.c
@@ -3966,7 +3966,7 @@ void BKE_read_animated_loc_rot(FractureModifierData *fmd, Object *ob, bool do_bi
DerivedMesh *dm = NULL;
int totvert, count = 0, i = 0, *orig_index = NULL, totpoly, items;
KDTree *tree = NULL;
- float anim_imat[4][4], imat[4][4];
+ float anim_imat[4][4], imat[4][4], ob_quat[4], anim_quat[4], ob_iquat[4];
if (!fmd->anim_mesh_ob)
return;
@@ -3985,6 +3985,11 @@ void BKE_read_animated_loc_rot(FractureModifierData *fmd, Object *ob, bool do_bi
invert_m4_m4(anim_imat, fmd->anim_mesh_ob->obmat);
invert_m4_m4(imat, ob->obmat);
+ mat4_to_quat(ob_quat, ob->obmat);
+ mat4_to_quat(anim_quat, fmd->anim_mesh_ob->obmat);
+
+ invert_qt_qt(ob_iquat, ob_quat);
+
if (totvert == 0) {
dm->release(dm);
return;
@@ -4217,6 +4222,8 @@ void BKE_read_animated_loc_rot(FractureModifierData *fmd, Object *ob, bool do_bi
mul_qt_qtqt(quat, rot, iquat);
}
}
+
+ //mul_qt_qtqt(quat, ob_quat, quat);
}
mul_qt_v3(quat, off);
@@ -4227,10 +4234,7 @@ void BKE_read_animated_loc_rot(FractureModifierData *fmd, Object *ob, bool do_bi
if (fmd->anim_mesh_rot)
{
- float ob_quat[4], anim_quat[4];
- mat4_to_quat(ob_quat, ob->obmat);
- mat4_to_quat(anim_quat, fmd->anim_mesh_ob->obmat);
- mul_qt_qtqt(quat, ob_quat, quat);
+ //mul_qt_qtqt(quat, ob_quat, quat);
mul_qt_qtqt(quat, anim_quat, quat);
copy_qt_qt(mi->rigidbody->orn, quat);
}
More information about the Bf-blender-cvs
mailing list