Revision: 16403
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16403
Author: ton
Date: 2008-09-07 12:24:02 +0200 (Sun, 07 Sep 2008)
Log Message:
-----------
Bugfix #17490
Camera feature "DOF Object" was drawing the cross marker on wrong location
when camera scales. Simple fix by using Mat4Ortho()
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/object.c
Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c 2008-09-07
07:59:06 UTC (rev 16402)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2008-09-07
10:24:02 UTC (rev 16403)
@@ -697,9 +697,11 @@
if (cam->dof_ob) {
/* too simple, better to return the distance on the view axis
only
* return VecLenf(ob->obmat[3], cam->dof_ob->obmat[3]); */
+ float mat[4][4], obmat[4][4];
- float mat[4][4];
- Mat4Invert(ob->imat, ob->obmat);
+ Mat4CpyMat4(obmat, ob->obmat);
+ Mat4Ortho(obmat);
+ Mat4Invert(ob->imat, obmat);
Mat4MulMat4(mat, cam->dof_ob->obmat, ob->imat);
return fabs(mat[3][2]);
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs