Fix T44677: Normal Edit Modifier Radial Mode broken with target object.
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 12 May 2015 08:56:28 +0000 (10:56 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 12 May 2015 08:57:39 +0000 (10:57 +0200)
Very stupid mistake, odd nobody hit this earlier... :/

source/blender/modifiers/intern/MOD_normal_edit.c

index 80636986583fc6a7466bf61946a5b55c89f2114d..8315f61c132ed0fcfb6a3fe754a4e28cf4288a67 100644 (file)
@@ -80,10 +80,13 @@ static void generate_vert_coordinates(
        }
 
        if (ob_center) {
+               float inv_obmat[4][4];
+
                /* Translate our coordinates so that center of ob_center is at (0, 0, 0). */
                /* Get ob_center (world) coordinates in ob local coordinates.
                 * No need to take into accound ob_center's space here, see T44027. */
-               mul_v3_m4v3(diff, ob->obmat, ob_center->obmat[3]);
+               invert_m4_m4(inv_obmat, ob->obmat);
+               mul_v3_m4v3(diff, inv_obmat, ob_center->obmat[3]);
                negate_v3(diff);
 
                do_diff = true;