From d822624adcaa04483cc7d694baa728a281de9b3d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 25 Aug 2014 20:58:36 +0200 Subject: Fix T41580: Cast modifier - Edit Cache problems. Modifiers should never ever modify data from target objects!!! With multithreaded evaluation, this is a nice bug factory! --- source/blender/modifiers/intern/MOD_cast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_cast.c') diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index ec077631c85..c4654287cfc 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -151,8 +151,8 @@ static void sphere_do( * we use its location, transformed to ob's local space */ if (ctrl_ob) { if (flag & MOD_CAST_USE_OB_TRANSFORM) { - invert_m4_m4(ctrl_ob->imat, ctrl_ob->obmat); - mul_m4_m4m4(mat, ctrl_ob->imat, ob->obmat); + invert_m4_m4(imat, ctrl_ob->obmat); + mul_m4_m4m4(mat, imat, ob->obmat); invert_m4_m4(imat, mat); } @@ -275,8 +275,8 @@ static void cuboid_do( if (ctrl_ob) { if (flag & MOD_CAST_USE_OB_TRANSFORM) { - invert_m4_m4(ctrl_ob->imat, ctrl_ob->obmat); - mul_m4_m4m4(mat, ctrl_ob->imat, ob->obmat); + invert_m4_m4(imat, ctrl_ob->obmat); + mul_m4_m4m4(mat, imat, ob->obmat); invert_m4_m4(imat, mat); } -- cgit v1.2.3