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!
This commit is contained in:
Bastien Montagne 2014-08-25 20:58:36 +02:00
parent 66b84ad159
commit d822624adc
Notes: blender-bot 2023-02-14 10:10:34 +01:00
Referenced by issue #41580, Cast modifier - Edit Cache problems
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}