[Bf-blender-cvs] [d822624] master: Fix T41580: Cast modifier - Edit Cache problems.
Bastien Montagne
noreply at git.blender.org
Mon Aug 25 21:01:14 CEST 2014
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);
}
More information about the Bf-blender-cvs
mailing list