diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cast.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_cast.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 30be1d33653..7581b2aa8e5 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -126,13 +126,13 @@ static void sphere_do(CastModifierData *cmd, * we use its location, transformed to ob's local space */ if (ctrl_ob) { if (flag & MOD_CAST_USE_OB_TRANSFORM) { - invert_m4_m4(imat, ctrl_ob->obmat); - mul_m4_m4m4(mat, imat, ob->obmat); + invert_m4_m4(imat, ctrl_ob->object_to_world); + mul_m4_m4m4(mat, imat, ob->object_to_world); invert_m4_m4(imat, mat); } - invert_m4_m4(ob->imat, ob->obmat); - mul_v3_m4v3(center, ob->imat, ctrl_ob->obmat[3]); + invert_m4_m4(ob->imat, ob->object_to_world); + mul_v3_m4v3(center, ob->imat, ctrl_ob->object_to_world[3]); } /* now we check which options the user wants */ @@ -275,13 +275,13 @@ static void cuboid_do(CastModifierData *cmd, if (ctrl_ob) { if (flag & MOD_CAST_USE_OB_TRANSFORM) { - invert_m4_m4(imat, ctrl_ob->obmat); - mul_m4_m4m4(mat, imat, ob->obmat); + invert_m4_m4(imat, ctrl_ob->object_to_world); + mul_m4_m4m4(mat, imat, ob->object_to_world); invert_m4_m4(imat, mat); } - invert_m4_m4(ob->imat, ob->obmat); - mul_v3_m4v3(center, ob->imat, ctrl_ob->obmat[3]); + invert_m4_m4(ob->imat, ob->object_to_world); + mul_v3_m4v3(center, ob->imat, ctrl_ob->object_to_world[3]); } if ((flag & MOD_CAST_SIZE_FROM_RADIUS) && has_radius) { |