Tomato: camera sensor changes
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 1 Nov 2011 18:39:07 +0000 (18:39 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 1 Nov 2011 18:39:07 +0000 (18:39 +0000)
* Rename "FOV Mode" to "Sensor Fit"
* Add sensor height back in presets, default to Horizontal fit for all presets
  except Blender, which uses Automatic.
* Some UI tweaks

47 files changed:
release/scripts/presets/camera/APS-C_DSLR.py
release/scripts/presets/camera/Blender.py
release/scripts/presets/camera/Canon_1100D.py
release/scripts/presets/camera/Canon_1D.py
release/scripts/presets/camera/Canon_1DS.py
release/scripts/presets/camera/Canon_500D.py
release/scripts/presets/camera/Canon_550D.py
release/scripts/presets/camera/Canon_5D.py
release/scripts/presets/camera/Canon_600D.py
release/scripts/presets/camera/Canon_60D.py
release/scripts/presets/camera/Canon_7D.py
release/scripts/presets/camera/Nikon_D300S.py
release/scripts/presets/camera/Nikon_D3100.py
release/scripts/presets/camera/Nikon_D35.py
release/scripts/presets/camera/Nikon_D5000.py
release/scripts/presets/camera/Nikon_D5100.py
release/scripts/presets/camera/Nikon_D7000.py
release/scripts/presets/camera/Nikon_D90.py
release/scripts/presets/camera/Red_Epic.py
release/scripts/presets/camera/Red_One_2K.py
release/scripts/presets/camera/Red_One_3K.py
release/scripts/presets/camera/Red_One_4K.py
release/scripts/presets/camera/full_frame_35mm_film.py
release/scripts/presets/camera/micro_four_thirds.py
release/scripts/presets/camera/super_16_film.py
release/scripts/presets/camera/super_35_film.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/properties_data_camera.py
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/object.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/makesdna/DNA_camera_types.h
source/blender/makesrna/intern/rna_camera.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/initrender.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Rasterizer/RAS_CameraData.h
source/gameengine/Rasterizer/RAS_FramingManager.cpp
source/gameengine/Rasterizer/RAS_FramingManager.h
source/gameengine/VideoTexture/ImageRender.cpp

index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 52143ced67dd5dad20118592695bf4abe311e2d3..9fa4ab752e364d96748cbdf4096f5126327acbc8 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 32
+bpy.context.object.data.sensor_height = 18
+bpy.context.object.data.sensor_fit = 'AUTO'
index ae6a4c2c893b51e8a9ad76a23cfd1f1221d27459..54f2cf75b540e6a6212f5998d6fcdba03a62b3ad 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.2
+bpy.context.object.data.sensor_height = 14.7
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 3b7fdecfc9646ea10386b2ef5577d2bb5499b6b2..0bb0e910377b3f993001bee94a34d255f5c1bd6a 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 27.9
+bpy.context.object.data.sensor_height = 18.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index dd1c1370d80af430783c83ca02de3777b4e752a2..158a6235f32fd898f1735be3215894f85bc3e3c7 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 24.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index dd1c1370d80af430783c83ca02de3777b4e752a2..158a6235f32fd898f1735be3215894f85bc3e3c7 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 24.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index facaa449079e64a4f7a485150a6ea0b91cb9be22..829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.3
+bpy.context.object.data.sensor_height = 14.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bcafd2146ba4193d5acbacd5382d64ecf6d461bc..a0505bf9b9c33822745d3c89a278be6b97eb4249 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 8dbd1df927c8f0894f0007590bf5f2cff6194f32..238d9c22d122af22859d66c7d8fb816b45f1329d 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.1
+bpy.context.object.data.sensor_height = 15.4
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index dd1c1370d80af430783c83ca02de3777b4e752a2..e6dc62dc100debe050f488df41424e5b319228a4 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 36.0
+bpy.context.object.data.sensor_height = 23.9
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bcafd2146ba4193d5acbacd5382d64ecf6d461bc..a0505bf9b9c33822745d3c89a278be6b97eb4249 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bcafd2146ba4193d5acbacd5382d64ecf6d461bc..1d819cce65b035f69809676cac6f489b645ab1cf 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bcafd2146ba4193d5acbacd5382d64ecf6d461bc..1d819cce65b035f69809676cac6f489b645ab1cf 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bcafd2146ba4193d5acbacd5382d64ecf6d461bc..a0505bf9b9c33822745d3c89a278be6b97eb4249 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 23.6
+bpy.context.object.data.sensor_height = 15.8
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 1acc53924e6bd27306a306f5f134c1af181746bf..14f4abaee9003f172a04a8a66cb53590c1ead4c5 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 30.0
+bpy.context.object.data.sensor_height = 15.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index bf6f986e35445531d2f1dee3c76bc85c6a17c0f0..ef2708f75b21891df77b6cd0146559d2641e76eb 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 11.1
+bpy.context.object.data.sensor_height = 6.24
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 4867839028b739d66580f9bb256471e28c837da2..5ddff2746eb2f182dd848540e64669891f58cf3b 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 16.65
+bpy.context.object.data.sensor_height = 9.36
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index ae6a4c2c893b51e8a9ad76a23cfd1f1221d27459..8ab9b38cbd5f22b6ea18aa7efbfd9f853d771583 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 22.2
+bpy.context.object.data.sensor_height = 12.6
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index e9301942b3b4a271c80217ac425c1984d8dbbe59..d3e141ba4d9fd22be27ede91ff887cf2afa9658e 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 36
+bpy.context.object.data.sensor_height = 24
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index a6785886f5a07ebcc30a6e12b7604bbe051401d8..36fb0aac3918813f67ef454d759ead4b44510a57 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 17.3
+bpy.context.object.data.sensor_height = 13.0
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 36e4ea153fa68c169ba507535fa29c12c9d42276..1e42953bf0525ac23eba45fd43e0183039dd4cf8 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 12.52
+bpy.context.object.data.sensor_height = 7.41
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index 641f7034b670e39fd70a6521ab2b801ddb66d63a..65ccb0f216c3e56b93910db07a6ec5cce7ffa768 100644 (file)
@@ -1,2 +1,4 @@
 import bpy
 bpy.context.object.data.sensor_width = 24.89
+bpy.context.object.data.sensor_height = 18.66
+bpy.context.object.data.sensor_fit = 'HORIZONTAL'
index e4b926653aba54250774608e1121a76d1852a128..ac19bab4c6686baeb7b2cc82e031c4ccbd04b755 100644 (file)
@@ -208,7 +208,7 @@ class AddPresetCamera(AddPresetBase, Operator):
     preset_values = [
         "cam.sensor_width",
         "cam.sensor_height",
-        "cam.fov_mode"
+        "cam.sensor_fit"
     ]
 
     preset_subdir = "camera"
index 7a65369285bc606e42b9390b7d9992b539ce19bb..4adaad75e42863a6f1e56b1be2aa3190edadc490 100644 (file)
@@ -129,12 +129,20 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
         row.operator("camera.preset_add", text="", icon="ZOOMIN")
         row.operator("camera.preset_add", text="", icon="ZOOMOUT").remove_active = True
 
-        layout.prop(cam, "fov_mode")
+        layout.label(text="Sensor:")
 
-        col = layout.column(align=True)
-        col.prop(cam, "sensor_width")
-        col.prop(cam, "sensor_height")
+        split = layout.split()
+
+        col = split.column(align=True)
+        if cam.sensor_fit == 'AUTO':
+            col.prop(cam, "sensor_width", text="Size")
+        else:
+            col.prop(cam, "sensor_width", text="Width")
+            col.prop(cam, "sensor_height", text="Height")
 
+        col = split.column(align=True)
+        col.prop(cam, "sensor_fit", text="")
         layout.label(text="Clipping:")
         row = layout.row(align=True)
         row.prop(cam, "clip_start", text="Start")
index 9a950b1bb6862d564c45e50b593f44b5e8a76a06..1177285176aa023283fb5ed052b179d8480e8c6c 100644 (file)
@@ -142,11 +142,11 @@ int object_is_modified(struct Scene *scene, struct Object *ob);
 
 void object_camera_mode(struct RenderData *rd, struct Object *camera);
 void object_camera_intrinsics(struct Object *camera, struct Camera **cam_r, short *is_ortho, float *shiftx, float *shifty,
-                       float *clipsta, float *clipend, float *lens, float *sensor_x, float *sensor_y, short *fov_mode);
+                       float *clipsta, float *clipend, float *lens, float *sensor_x, float *sensor_y, short *sensor_fit);
 void object_camera_matrix(
                struct RenderData *rd, struct Object *camera, int winx, int winy, short field_second,
                float winmat[][4], struct rctf *viewplane, float *clipsta, float *clipend, float *lens,
-               float *sensor_x, float *sensor_y, short *fov_mode, float *ycor,
+               float *sensor_x, float *sensor_y, short *sensor_fit, float *ycor,
                float *viewdx, float *viewdy);
 
 void camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
index 2d83b85474a70491231d58efe680054ff1b3c2c7..d91a0d46e6ad653e65c4f661bec2ceb42e3f66f8 100644 (file)
@@ -4008,7 +4008,7 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase
 
                        if(len>FLT_EPSILON) {
                                float pos[2], rmat[4][4], shiftx= 0.0f, shifty= 0.0f, clipsta= 0.0f, clipend= 0.0f;
-                               short is_ortho= 0, fov_mode= CAMERA_FOV_AUTO;
+                               short is_ortho= 0, sensor_fit= CAMERA_SENSOR_FIT_AUTO;
                                Camera *cam= NULL;
 
                                user.framenr= scene->r.cfra;
@@ -4016,7 +4016,7 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase
 
                                add_v2_v2v2(pos, marker->pos, track->offset);
 
-                               object_camera_intrinsics(camob, &cam, &is_ortho, &shiftx, &shifty, &clipsta, &clipend, &lens, &sensor_x, &sensor_y, &fov_mode);
+                               object_camera_intrinsics(camob, &cam, &is_ortho, &shiftx, &shifty, &clipsta, &clipend, &lens, &sensor_x, &sensor_y, &sensor_fit);
 
                                if(is_ortho) {
                                        if(cam)
index 91eb665ad44d96f61e1a7b15ebf551197049005e..2d0a82fd2d83e81d328ddf66d4110d802b88e0c5 100644 (file)
@@ -2977,7 +2977,7 @@ void object_camera_mode(RenderData *rd, Object *camera)
 }
 
 void object_camera_intrinsics(Object *camera, Camera **cam_r, short *is_ortho, float *shiftx, float *shifty,
-                       float *clipsta, float *clipend, float *lens, float *sensor_x, float *sensor_y, short *fov_mode)
+                       float *clipsta, float *clipend, float *lens, float *sensor_x, float *sensor_y, short *sensor_fit)
 {
        Camera *cam= NULL;
 
@@ -2986,7 +2986,7 @@ void object_camera_intrinsics(Object *camera, Camera **cam_r, short *is_ortho, f
 
        (*sensor_x)= DEFAULT_SENSOR_WIDTH;
        (*sensor_y)= DEFAULT_SENSOR_HEIGHT;
-       (*fov_mode)= CAMERA_FOV_AUTO;
+       (*sensor_fit)= CAMERA_SENSOR_FIT_AUTO;
 
        if(camera->type==OB_CAMERA) {
                cam= camera->data;
@@ -3012,7 +3012,7 @@ void object_camera_intrinsics(Object *camera, Camera **cam_r, short *is_ortho, f
                (*sensor_y)= cam->sensor_y;
                (*clipsta)= cam->clipsta;
                (*clipend)= cam->clipend;
-               (*fov_mode)= cam->fov_mode;
+               (*sensor_fit)= cam->sensor_fit;
        }
        else if(camera->type==OB_LAMP) {
                Lamp *la= camera->data;
@@ -3042,7 +3042,7 @@ void object_camera_intrinsics(Object *camera, Camera **cam_r, short *is_ortho, f
 void object_camera_matrix(
                RenderData *rd, Object *camera, int winx, int winy, short field_second,
                float winmat[][4], rctf *viewplane, float *clipsta, float *clipend, float *lens,
-               float *sensor_x, float *sensor_y, short *fov_mode, float *ycor,
+               float *sensor_x, float *sensor_y, short *sensor_fit, float *ycor,
                float *viewdx, float *viewdy)
 {
        Camera *cam=NULL;
@@ -3055,15 +3055,15 @@ void object_camera_matrix(
        if(rd->mode & R_FIELDS)
                (*ycor) *= 2.0f;
 
-       object_camera_intrinsics(camera, &cam, &is_ortho, &shiftx, &shifty, clipsta, clipend, lens, sensor_x, sensor_y, fov_mode);
+       object_camera_intrinsics(camera, &cam, &is_ortho, &shiftx, &shifty, clipsta, clipend, lens, sensor_x, sensor_y, sensor_fit);
 
        /* ortho only with camera available */
        if(cam && is_ortho) {
-               if((*fov_mode)==CAMERA_FOV_AUTO) {
+               if((*sensor_fit)==CAMERA_SENSOR_FIT_AUTO) {
                        if(rd->xasp*winx >= rd->yasp*winy) viewfac= winx;
                        else viewfac= (*ycor) * winy;
                }
-               else if((*fov_mode)==CAMERA_FOV_HOR) {
+               else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= winx;
                }
                else {
@@ -3074,14 +3074,14 @@ void object_camera_matrix(
                pixsize= cam->ortho_scale/viewfac;
        }
        else {
-               if((*fov_mode)==CAMERA_FOV_AUTO) {
+               if((*sensor_fit)==CAMERA_SENSOR_FIT_AUTO) {
                        if(rd->xasp*winx >= rd->yasp*winy)      viewfac= ((*lens) * winx) / (*sensor_x);
                        else                                    viewfac= (*ycor) * ((*lens) * winy) / (*sensor_x);
                }
-               else if((*fov_mode)==CAMERA_FOV_HOR) {
+               else if((*sensor_fit)==CAMERA_SENSOR_FIT_HOR) {
                        viewfac= ((*lens) * winx) / (*sensor_x);
                }
-               else if((*fov_mode)==CAMERA_FOV_VERT) {
+               else if((*sensor_fit)==CAMERA_SENSOR_FIT_VERT) {
                        viewfac= ((*lens) * winy) / (*sensor_y);
                }
 
@@ -3092,9 +3092,9 @@ void object_camera_matrix(
        winside= MAX2(winx, winy);
 
        if(cam) {
-               if(cam->fov_mode==CAMERA_FOV_HOR)
+               if(cam->sensor_fit==CAMERA_SENSOR_FIT_HOR)
                        winside= winx;
-               else if(cam->fov_mode==CAMERA_FOV_VERT)
+               else if(cam->sensor_fit==CAMERA_SENSOR_FIT_VERT)
                        winside= winy;
        }
 
@@ -3141,7 +3141,7 @@ void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const sh
                float aspx= (float) scene->r.xsch*scene->r.xasp;
                float aspy= (float) scene->r.ysch*scene->r.yasp;
 
-               if(camera->fov_mode==CAMERA_FOV_AUTO) {
+               if(camera->sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                        if(aspx < aspy) {
                                r_asp[0]= aspx / aspy;
                                r_asp[1]= 1.0;
@@ -3151,7 +3151,7 @@ void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const sh
                                r_asp[1]= aspy / aspx;
                        }
                }
-               else if(camera->fov_mode==CAMERA_FOV_AUTO) {
+               else if(camera->sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                        r_asp[0]= aspx / aspy;
                        r_asp[1]= 1.0;
                }
@@ -3177,7 +3177,7 @@ void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const sh
        else {
                /* that way it's always visible - clipsta+0.1 */
                float fac;
-               float half_sensor= 0.5f*((camera->fov_mode==CAMERA_FOV_VERT) ? (camera->sensor_y) : (camera->sensor_x));
+               float half_sensor= 0.5f*((camera->sensor_fit==CAMERA_SENSOR_FIT_VERT) ? (camera->sensor_y) : (camera->sensor_x));
 
                *r_drawsize= drawsize / ((scale[0] + scale[1] + scale[2]) / 3.0f);
 
index 292d998bf5cb5df505e91b3daee1dd591640d5e9..92544b2309c8123a2695b2464181fc9fe4ebc6d5 100644 (file)
@@ -3002,7 +3002,7 @@ static void project_paint_begin(ProjPaintState *ps)
 
                                /* dont actually use these */
                                float _viewdx, _viewdy, _ycor, _lens=0.0f, _sensor_x=DEFAULT_SENSOR_WIDTH, _sensor_y= DEFAULT_SENSOR_HEIGHT;
-                               short _fov_mode= CAMERA_FOV_AUTO;
+                               short _sensor_fit= CAMERA_SENSOR_FIT_AUTO;
                                rctf _viewplane;
 
                                /* viewmat & viewinv */
@@ -3014,7 +3014,7 @@ static void project_paint_begin(ProjPaintState *ps)
                                object_camera_mode(&ps->scene->r, camera);
                                object_camera_matrix(&ps->scene->r, camera, ps->winx, ps->winy, 0,
                                                winmat, &_viewplane, &ps->clipsta, &ps->clipend,
-                                               &_lens, &_sensor_x, &_sensor_x, &_fov_mode, &_ycor, &_viewdx, &_viewdy);
+                                               &_lens, &_sensor_x, &_sensor_x, &_sensor_fit, &_ycor, &_viewdx, &_viewdy);
 
                                ps->is_ortho= (ps->scene->r.mode & R_ORTHO) ? 1 : 0;
                        }
index 88b824b69bb6f417d3b8cfd31205655f5ec7c021..e3f973cb1ef94106838b16ad48aabad479820777 100644 (file)
@@ -924,14 +924,14 @@ static void draw_selected_name(Scene *scene, Object *ob)
 void view3d_viewborder_size_get(Scene *scene, Object *camob, ARegion *ar, float size_r[2])
 {
        float aspect= (scene->r.xsch*scene->r.xasp) / (scene->r.ysch*scene->r.yasp);
-       short fov_mode= CAMERA_FOV_AUTO;
+       short sensor_fit= CAMERA_SENSOR_FIT_AUTO;
 
        if(camob && camob->type==OB_CAMERA) {
                Camera *cam= (Camera *)camob->data;
-               fov_mode= cam->fov_mode;
+               sensor_fit= cam->sensor_fit;
        }
 
-       if(fov_mode==CAMERA_FOV_AUTO) {
+       if(sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                float winmax= MAX2(ar->winx, ar->winy);
 
                if(aspect > 1.0f) {
@@ -942,7 +942,7 @@ void view3d_viewborder_size_get(Scene *scene, Object *camob, ARegion *ar, float
                        size_r[1]= winmax;
                }
        }
-       else if(fov_mode==CAMERA_FOV_HOR) {
+       else if(sensor_fit==CAMERA_SENSOR_FIT_HOR) {
                size_r[0]= ar->winx;
                size_r[1]= ar->winx/aspect;
        }
@@ -2459,11 +2459,11 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
        if(rv3d->persp==RV3D_CAMOB && v3d->camera) {
                float winmat[4][4];
                float _clipsta, _clipend, _lens, _yco, _dx, _dy, _sensor_x= DEFAULT_SENSOR_WIDTH, _sensor_y= DEFAULT_SENSOR_HEIGHT;
-               short _fov_mode= CAMERA_FOV_AUTO;
+               short _sensor_fit= CAMERA_SENSOR_FIT_AUTO;
                rctf _viewplane;
 
                object_camera_matrix(&scene->r, v3d->camera, sizex, sizey, 0, winmat, &_viewplane, &_clipsta, &_clipend, &_lens,
-                       &_sensor_x, &_sensor_y, &_fov_mode, &_yco, &_dx, &_dy);
+                       &_sensor_x, &_sensor_y, &_sensor_fit, &_yco, &_dx, &_dy);
 
                ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
        }
@@ -2519,9 +2519,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w
 
        {
                float _yco, _dx, _dy, _sensor_x= DEFAULT_SENSOR_WIDTH, _sensor_y= DEFAULT_SENSOR_HEIGHT;
-               short _fov_mode= CAMERA_FOV_AUTO;
+               short _sensor_fit= CAMERA_SENSOR_FIT_AUTO;
                rctf _viewplane;
-               object_camera_matrix(&scene->r, v3d.camera, width, height, 0, rv3d.winmat, &_viewplane, &v3d.near, &v3d.far, &v3d.lens, &_sensor_x, &_sensor_y, &_fov_mode, &_yco, &_dx, &_dy);
+               object_camera_matrix(&scene->r, v3d.camera, width, height, 0, rv3d.winmat, &_viewplane, &v3d.near, &v3d.far, &v3d.lens, &_sensor_x, &_sensor_y, &_sensor_fit, &_yco, &_dx, &_dy);
        }
 
        mul_m4_m4m4(rv3d.persmat, rv3d.viewmat, rv3d.winmat);
index d461889db5217ebe42cba3cde3e70f02210ab5a5..7de1f2a85bb8dd03387f0aa02c356027b6639959 100644 (file)
@@ -969,7 +969,7 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
        float lens, sensor_x =DEFAULT_SENSOR_WIDTH, sensor_y= DEFAULT_SENSOR_HEIGHT, fac, x1, y1, x2, y2;
        float winx= (float)winxi, winy= (float)winyi;
        int orth= 0;
-       short fov_mode= CAMERA_FOV_AUTO;
+       short sensor_fit= CAMERA_SENSOR_FIT_AUTO;
 
        /* currnetly using sensor size (depends on fov calculating method) */
        float sensor= DEFAULT_SENSOR_WIDTH;
@@ -1000,9 +1000,9 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
                                sensor_y= cam->sensor_y;
                                *clipsta= cam->clipsta;
                                *clipend= cam->clipend;
-                               fov_mode= cam->fov_mode;
+                               sensor_fit= cam->sensor_fit;
 
-                               sensor= (cam->fov_mode==CAMERA_FOV_VERT) ? (cam->sensor_y) : (cam->sensor_x);
+                               sensor= (cam->sensor_fit==CAMERA_SENSOR_FIT_VERT) ? (cam->sensor_y) : (cam->sensor_x);
                        }
                }
        }
@@ -1034,7 +1034,7 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
                        /* ortho_scale == 1 means exact 1 to 1 mapping */
                        float dfac= 2.0f*cam->ortho_scale/fac;
 
-                       if(fov_mode==CAMERA_FOV_AUTO) {
+                       if(sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                                if(winx>winy) {
                                        x1= -dfac;
                                        y1= -winy*dfac/winx;
@@ -1044,7 +1044,7 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
                                        y1= -dfac;
                                }
                        }
-                       else if(fov_mode==CAMERA_FOV_HOR) {
+                       else if(sensor_fit==CAMERA_SENSOR_FIT_HOR) {
                                x1= -dfac;
                                y1= -winy*dfac/winx;
                        }
@@ -1061,11 +1061,11 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
                else {
                        float dfac;
                        
-                       if(fov_mode==CAMERA_FOV_AUTO) {
+                       if(sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                                if(winx>winy) dfac= (sensor_x * 2.0) / (fac*winx*lens);
                                else dfac= (sensor_x * 2.0) / (fac*winy*lens);
                        }
-                       else if(fov_mode==CAMERA_FOV_HOR) {
+                       else if(sensor_fit==CAMERA_SENSOR_FIT_HOR) {
                                dfac= (sensor_x * 2.0) / (fac*winx*lens);
                        }
                        else {
@@ -1110,9 +1110,9 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winy
                else {
                        float size= ((winx >= winy)? winx: winy);
 
-                       if(fov_mode==CAMERA_FOV_HOR)
+                       if(sensor_fit==CAMERA_SENSOR_FIT_HOR)
                                size= winx;
-                       else if(fov_mode==CAMERA_FOV_VERT)
+                       else if(sensor_fit==CAMERA_SENSOR_FIT_VERT)
                                size= winy;
 
                        viewfac= (size*lens)/sensor;
index 08e8239641edde6d8aaee2c99b0d586224f382e4..292f920da66f4179d06907165ebe2ae28f04600f 100644 (file)
@@ -63,7 +63,7 @@ typedef struct Camera {
        
        struct Object *dof_ob;
 
-       char fov_mode;
+       char sensor_fit;
        char pad[7];
 } Camera;
 
@@ -97,10 +97,10 @@ typedef struct Camera {
 /* yafray: dof sampling switch */
 /* #define CAM_YF_NO_QMC       512 */ /* depreceated */
 
-/* FOV mode */
-#define CAMERA_FOV_AUTO        0
-#define CAMERA_FOV_HOR 1
-#define CAMERA_FOV_VERT        2
+/* Sensor fit */
+#define CAMERA_SENSOR_FIT_AUTO 0
+#define CAMERA_SENSOR_FIT_HOR  1
+#define CAMERA_SENSOR_FIT_VERT 2
 
 #define DEFAULT_SENSOR_WIDTH   32.0f
 #define DEFAULT_SENSOR_HEIGHT  18.0f
index 69afd2dc4272223deceb2d3ba385946bcdbc6a26..1e7a969caaa3a07b02130baef013ed4c5b7f0b5b 100644 (file)
 /* only for rad/deg conversion! can remove later */
 static float get_camera_sensor(Camera *cam)
 {
-       if(cam->fov_mode==CAMERA_FOV_AUTO) {
+       if(cam->sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                return cam->sensor_x;
        }
-       else if(cam->fov_mode==CAMERA_FOV_HOR) {
+       else if(cam->sensor_fit==CAMERA_SENSOR_FIT_HOR) {
                return cam->sensor_x;
        }
        else {
@@ -125,10 +125,10 @@ void RNA_def_camera(BlenderRNA *brna)
                {0, "MILLIMETERS", 0, "Millimeters", ""},
                {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
                {0, NULL, 0, NULL, NULL}};
-       static EnumPropertyItem fov_mode_items[] = {
-               {CAMERA_FOV_AUTO, "AUTO", 0, "Auto", "Calculate FOV using sensor size direction depending on image resolution"},
-               {CAMERA_FOV_HOR, "HORIZONTAL", 0, "Hoizontal", "Calculate FOV using sensor width"},
-               {CAMERA_FOV_VERT, "VERTICAL", 0, "Vertical", "Calculate FOV using sensor height"},
+       static EnumPropertyItem sensor_fit_items[] = {
+               {CAMERA_SENSOR_FIT_AUTO, "AUTO", 0, "Auto", "Calculate field of view using sensor size, with direction depending on image resolution"},
+               {CAMERA_SENSOR_FIT_HOR, "HORIZONTAL", 0, "Horizontal", "Calculate field of view using sensor width"},
+               {CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Calculate field of view using sensor height"},
                {0, NULL, 0, NULL, NULL}};
 
        srna= RNA_def_struct(brna, "Camera", "ID");
@@ -148,10 +148,10 @@ void RNA_def_camera(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Composition Guides",  "Draw overlay");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
-       prop= RNA_def_property(srna, "fov_mode", PROP_ENUM, PROP_NONE);
-       RNA_def_property_enum_sdna(prop, NULL, "fov_mode");
-       RNA_def_property_enum_items(prop, fov_mode_items);
-       RNA_def_property_ui_text(prop, "FOV Mode", "Mode of calculating FOV from sensor imensions and focal length");
+       prop= RNA_def_property(srna, "sensor_fit", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "sensor_fit");
+       RNA_def_property_enum_items(prop, sensor_fit_items);
+       RNA_def_property_ui_text(prop, "Sensor Fit", "Mode of calculating field of view from sensor dimensions and focal length");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
 
        /* Number values */
index 0515c08a4e1b265398018fb29fc590f78f93db01..d5dd0078a8093a8be3fb97272e468ec4c8ed127a 100644 (file)
@@ -195,11 +195,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
                                free_uci= 1;
                        }
                        else {
-                               float sensor= (cam->fov_mode == CAMERA_FOV_VERT) ? (cam->sensor_y) : cam->sensor_x;
+                               float sensor= (cam->sensor_fit == CAMERA_SENSOR_FIT_VERT) ? (cam->sensor_y) : cam->sensor_x;
                                float scale= (cam->type == CAM_PERSP) ? cam->clipsta * sensor / cam->lens : cam->ortho_scale;
                                float xmax, xmin, ymax, ymin;
 
-                               if(cam->fov_mode==CAMERA_FOV_AUTO) {
+                               if(cam->sensor_fit==CAMERA_SENSOR_FIT_AUTO) {
                                        if(aspect > 1.0f) {
                                                xmax = 0.5f * scale;
                                                ymax = xmax / aspect;
@@ -208,7 +208,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
                                                xmax = ymax * aspect;
                                        }
                                }
-                               else if(cam->fov_mode==CAMERA_FOV_HOR) {
+                               else if(cam->sensor_fit==CAMERA_SENSOR_FIT_HOR) {
                                        xmax = 0.5f * scale;
                                        ymax = xmax / aspect;
                                }
index cfc05533438ad09e5ea605bdf79f8d15e3bab68b..2dcfa9b82adbddb9168ad867988323a4259d64f5 100644 (file)
@@ -155,7 +155,7 @@ struct Render
        float lens;
        float sensor_x, sensor_y; /* image sensor size, same variable in camera */
        float ycor; /* (scene->xasp / scene->yasp), multiplied with 'winy' */
-       char fov_mode;
+       char sensor_fit;
        
        float panophi, panosi, panoco, panodxp, panodxv;
        
index 77204365c0e58e37f0813a9daca3506ed0adb644..b4dd68ab48ebac0b6aaf896e44c4b402694d10ed 100644 (file)
@@ -458,7 +458,7 @@ void RE_SetCamera(Render *re, Object *camera)
 
        object_camera_matrix(&re->r, camera, re->winx, re->winy, re->flag & R_SEC_FIELD,
                        re->winmat, &re->viewplane, &re->clipsta, &re->clipend,
-                       &re->lens, &re->sensor_x, &re->sensor_y, &re->fov_mode, &re->ycor, &re->viewdx, &re->viewdy);
+                       &re->lens, &re->sensor_x, &re->sensor_y, &re->sensor_fit, &re->ycor, &re->viewdx, &re->viewdy);
 }
 
 void RE_SetPixelSize(Render *re, float pixsize)
index 80661fc29de356ac931992024c14aa6f4b0f5d1d..c51c5861b525fb365e2d3249e6669f762e226cac 100644 (file)
@@ -1724,7 +1724,7 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
 
 static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter) {
        Camera* ca = static_cast<Camera*>(ob->data);
-       RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->fov_mode, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
+       RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->sensor_fit, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
        KX_Camera *gamecamera;
        
        gamecamera= new KX_Camera(kxscene, KX_Scene::m_callbacks, camdata);
index 64bba6c87ca91aa09235e25ccafc9ea04a2624cc..bc0bd52c69dc2690768b50f44b5bf7bae6a5b81c 100644 (file)
@@ -216,9 +216,9 @@ float KX_Camera::GetSensorHeight() const
        return m_camdata.m_sensor_y;
 }
 /** Gets the mode FOV is calculating from sensor dimensions */
-short KX_Camera::GetFOVMode() const
+short KX_Camera::GetSensorFit() const
 {
-       return m_camdata.m_fov_mode;
+       return m_camdata.m_sensor_fit;
 }
 
 float KX_Camera::GetCameraNear() const
index cc114deaef70eb2569fb08211ed14c3148a2775c..236e914b9e5eccb4a700c55a3161455a4fb6f4e1 100644 (file)
@@ -204,7 +204,7 @@ public:
        /** Gets the vertical size of the sensor - for camera matching */
        float                           GetSensorHeight() const;
        /** Gets the mode FOV is calculating from sensor dimensions */
-       short                           GetFOVMode() const;
+       short                           GetSensorFit() const;
        /** Gets the near clip distance. */
        float                           GetCameraNear() const;
        /** Gets the far clip distance. */
index 371b3cdbb3cc2fe983f8d8e615248522b99517bc..a9be588e6b2e0df9b96413391ab2857fd0fec240 100644 (file)
@@ -1251,7 +1251,7 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam)
                                cam->GetScale(),
                                nearfrust,
                                farfrust,
-                               cam->GetFOVMode(),
+                               cam->GetSensorFit(),
                                frustum
                        );
                        if (!cam->GetViewport()) {
@@ -1271,7 +1271,7 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam)
                                cam->GetLens(),
                                cam->GetSensorWidth(),
                                cam->GetSensorHeight(),
-                               cam->GetFOVMode(),
+                               cam->GetSensorFit(),
                                nearfrust,
                                farfrust,
                                frustum
index 7726aaafbca5452ee535d777f58df14e9695be51..2120a18f1394cd295dd6a6634889f08ab7fe7935 100644 (file)
@@ -38,7 +38,7 @@ struct RAS_CameraData
        float m_scale;
        float m_sensor_x;
        float m_sensor_y;
-       short m_fov_mode;
+       short m_sensor_fit;
        float m_clipstart;
        float m_clipend;
        bool m_perspective;
@@ -49,7 +49,7 @@ struct RAS_CameraData
        int m_viewporttop;
        float m_focallength;
 
-       RAS_CameraData(float lens = 35.0, float scale = 6.0, float sensor_x = 32.0, float sensor_y = 18.0, short fov_mode = 0,
+       RAS_CameraData(float lens = 35.0, float scale = 6.0, float sensor_x = 32.0, float sensor_y = 18.0, short sensor_fit = 0,
                       float clipstart = 0.1, float clipend = 5000.0, bool perspective = true,
                       float focallength = 3.0, bool viewport = false, int viewportleft = 0, int viewportbottom = 0,
                       int viewportright = 0, int viewporttop = 0) :
@@ -57,7 +57,7 @@ struct RAS_CameraData
            m_scale(scale),
            m_sensor_x(sensor_x),
            m_sensor_y(sensor_y),
-               m_fov_mode(fov_mode),
+               m_sensor_fit(sensor_fit),
            m_clipstart(clipstart),
            m_clipend(clipend),
            m_perspective(perspective),
index 7cd46acb08508ba4ce47387bdafe1219cfb1d809..8a5c10b3a3b2807191cd24b86a3349452fbdc983 100644 (file)
@@ -40,7 +40,7 @@ ComputeDefaultFrustum(
        const float camfar,
        const float lens,
        const float sensor_x, const float sensor_y,
-       const short fov_mode,
+       const short sensor_fit,
        const float design_aspect_ratio,
        RAS_FrameFrustum & frustum
 ){             
@@ -48,7 +48,7 @@ ComputeDefaultFrustum(
        float sizeX;
        float sizeY;
 
-       if(fov_mode==RAS_FOVMODE_AUTO) {
+       if(sensor_fit==RAS_SENSORFIT_AUTO) {
                halfSize = (sensor_x / 2.f) * camnear / lens;
 
                if (design_aspect_ratio > 1.f) {
@@ -61,7 +61,7 @@ ComputeDefaultFrustum(
                        sizeY = halfSize;
                }
        }
-       else if(fov_mode==RAS_FOVMODE_HOR) {
+       else if(sensor_fit==RAS_SENSORFIT_HOR) {
                halfSize = (sensor_x / 2.f) * camnear / lens;
                sizeX = halfSize;
                sizeY = halfSize/design_aspect_ratio;
@@ -87,7 +87,7 @@ ComputeDefaultOrtho(
        const float camfar,
        const float scale,
        const float design_aspect_ratio,
-       const short fov_mode,
+       const short sensor_fit,
        RAS_FrameFrustum & frustum
 )
 {
@@ -95,7 +95,7 @@ ComputeDefaultOrtho(
        float sizeX;
        float sizeY;
 
-       if(fov_mode==RAS_FOVMODE_AUTO) {
+       if(sensor_fit==RAS_SENSORFIT_AUTO) {
                if (design_aspect_ratio > 1.f) {
                        // halfsize defines the width
                        sizeX = halfSize;
@@ -106,7 +106,7 @@ ComputeDefaultOrtho(
                        sizeY = halfSize;
                }
        }
-       else if(fov_mode==RAS_FOVMODE_HOR) {
+       else if(sensor_fit==RAS_SENSORFIT_HOR) {
                sizeX = halfSize;
                sizeY = halfSize/design_aspect_ratio;
        }
@@ -220,7 +220,7 @@ ComputeFrustum(
        const RAS_Rect &availableViewport,
        const RAS_Rect &viewport,
        const float lens,
-       const float sensor_x, const float sensor_y, const short fov_mode,
+       const float sensor_x, const float sensor_y, const short sensor_fit,
        const float camnear,
        const float camfar,
        RAS_FrameFrustum &frustum
@@ -248,7 +248,7 @@ ComputeFrustum(
                lens,
                sensor_x,
                sensor_y,
-               fov_mode,
+               sensor_fit,
                design_aspect_ratio,
                frustum
        );
@@ -294,7 +294,7 @@ RAS_FramingManager::
                const float scale,
                const float camnear,
                const float camfar,
-               const short fov_mode,
+               const short sensor_fit,
                RAS_FrameFrustum &frustum
        )
 {
@@ -319,7 +319,7 @@ RAS_FramingManager::
                camfar,
                scale,
                design_aspect_ratio,
-               fov_mode,
+               sensor_fit,
                frustum
        );
 
index 0ae7b6f18a6734d5f92ce91de00282f93cde8d77..612142234e39144194c7ddc6783d0b99d783fcff 100644 (file)
@@ -184,12 +184,12 @@ enum RAS_CullingMode
        RAS_CULLING_NONE
 };
 
-/* Should match CAMERA_FOV... from DNA_camera_types.h */
-enum RAS_FovMode
+/* Should match CAMERA_SENSOR_FIT... from DNA_camera_types.h */
+enum RAS_SensorFit
 {
-       RAS_FOVMODE_AUTO = 0,
-       RAS_FOVMODE_HOR,
-       RAS_FOVMODE_VERT
+       RAS_SENSORFIT_AUTO = 0,
+       RAS_SENSORFIT_HOR,
+       RAS_SENSORFIT_VERT
 };
 
 /**
@@ -237,7 +237,7 @@ public :
                const float scale,
                const float camnear,
                const float camfar,
-               const short fov_mode,
+               const short sensor_fit,
                RAS_FrameFrustum &frustum
        );
 
@@ -248,7 +248,7 @@ public :
                const RAS_Rect &availableViewport,
                const RAS_Rect &viewport,
                const float lens,
-               const float sensor_x, const float sensor_y, const short fov_mode,
+               const float sensor_x, const float sensor_y, const short sensor_fit,
                const float camnear,
                const float camfar,
                RAS_FrameFrustum &frustum
@@ -261,7 +261,7 @@ public :
                const float camfar,
                const float lens,
                const float sensor_x, const float sensor_y,
-               const short fov_mode,
+               const short sensor_fit,
                const float design_aspect_ratio,
                RAS_FrameFrustum & frustum
        );      
@@ -273,7 +273,7 @@ public :
                const float camfar,
                const float scale,
                const float design_aspect_ratio,
-               const short fov_mode,
+               const short sensor_fit,
                RAS_FrameFrustum & frustum
        );
 
index 8bc8c67db6b356917e4a1b95e8932e261ac23e68..a349b45e4037ea01dec061e649898a0e9cab3410 100644 (file)
@@ -235,7 +235,7 @@ void ImageRender::Render()
                                    farfrust,
                                    m_camera->GetScale(),
                                    aspect_ratio,
-                                               m_camera->GetFOVMode(),
+                                               m_camera->GetSensorFit(),
                                    frustrum
                                    );
 
@@ -249,7 +249,7 @@ void ImageRender::Render()
                                    lens,
                                    sensor_x,
                                    sensor_y,
-                                   RAS_FOVMODE_AUTO,
+                                   RAS_SENSORFIT_AUTO,
                                    aspect_ratio,
                                    frustrum);