Commit: d822624adcaa04483cc7d694baa728a281de9b3d
Author: Bastien Montagne
Date:   Mon Aug 25 20:58:36 2014 +0200
Branches: master
https://developer.blender.org/rBd822624adcaa04483cc7d694baa728a281de9b3d

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!

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

M       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 ec07763..c465428 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);
                }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to