diff options
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 5806b269e7d..048e1cd01e3 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -741,12 +741,12 @@ float dof_camera(Object *ob) if (cam->dof_ob) { /* too simple, better to return the distance on the view axis only * return len_v3v3(ob->obmat[3], cam->dof_ob->obmat[3]); */ - float mat[4][4], obmat[4][4]; + float mat[4][4], imat[4][4], obmat[4][4]; copy_m4_m4(obmat, ob->obmat); normalize_m4(obmat); - invert_m4_m4(ob->imat, obmat); - mul_m4_m4m4(mat, cam->dof_ob->obmat, ob->imat); + invert_m4_m4(imat, obmat); + mul_m4_m4m4(mat, cam->dof_ob->obmat, imat); return (float)fabs(mat[3][2]); } return cam->YF_dofdist; |