Fix for using non camera objects as a camera having zero area view-frame
[blender.git] / source / blender / editors / space_view3d / view3d_edit.c
index cf593a68d77f0af2ddc0b42136f70b3aca655975..f2f4f0f97aa6fac785704508c50dfe04118a3c9d 100644 (file)
@@ -2533,6 +2533,8 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
                        if (rv3d->persp == RV3D_CAMOB && ED_view3d_camera_lock_check(v3d, rv3d)) {
                                CameraParams params;
                                BKE_camera_params_init(&params);
+                               params.clipsta = v3d->near;
+                               params.clipend = v3d->far;
                                BKE_camera_params_from_object(&params, v3d->camera);
 
                                lens = params.lens;