[Bf-blender-cvs] [e8dd6128b58] master: Fix warp modifier using pose matrix without object matrix applied

Cody Winchester noreply at git.blender.org
Sun Mar 29 09:59:50 CEST 2020


Commit: e8dd6128b58b138b0163e6376a6e8a54cc6e5ab1
Author: Cody Winchester
Date:   Sun Mar 29 18:56:59 2020 +1100
Branches: master
https://developer.blender.org/rBe8dd6128b58b138b0163e6376a6e8a54cc6e5ab1

Fix warp modifier using pose matrix without object matrix applied

Error in recent patch D6820

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

M	source/blender/modifiers/intern/MOD_warp.c

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

diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 3157dddd8fc..b8db14f610a 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -90,7 +90,9 @@ static void matrix_from_obj_pchan(float mat[4][4], float obinv[4][4], Object *ob
 {
   bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bonename);
   if (pchan) {
-    mul_m4_m4m4(mat, obinv, pchan->pose_mat);
+    float mat_bone_world[4][4];
+    mul_m4_m4m4(mat_bone_world, ob->obmat, pchan->pose_mat);
+    mul_m4_m4m4(mat, obinv, mat_bone_world);
   }
   else {
     mul_m4_m4m4(mat, obinv, ob->obmat);



More information about the Bf-blender-cvs mailing list