fix for uv project modifier, broke when angle was removed.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 16 Apr 2010 15:19:55 +0000 (15:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 16 Apr 2010 15:19:55 +0000 (15:19 +0000)
source/blender/blenlib/intern/uvproject.c

index 51e2269326afd29fa6416e4188e378189ba8d392..0eb5504016ee0510e10a713eee112d607c202eed 100644 (file)
@@ -39,6 +39,9 @@ typedef struct UvCameraInfo {
        short do_persp, do_pano, do_rotmat;
 } UvCameraInfo;
 
+/* ugly */
+extern float camera_get_angle(struct Camera *cam);
+
 void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
 {
        float pv4[4];
@@ -135,7 +138,7 @@ UvCameraInfo *project_camera_info(Object *ob, float (*rotmat)[4], float winx, fl
        uci.do_pano = (camera->flag & CAM_PANORAMA);
        uci.do_persp = (camera->type==CAM_PERSP);
 
-       uci.camangle= DEG2RAD(camera_get_angle(camera))/2.0f;
+       uci.camangle= camera_get_angle(camera)/2.0f;
        uci.camsize=  uci.do_persp ?  uci.camsize= tanf(uci.camangle) : camera->ortho_scale;
 
        if (invert_m4_m4(uci.caminv, ob->obmat)) {