Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-30 10:55:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-30 10:55:36 +0400
commitad2b41bc4bae3b0406ce6fcee69be581b0e96105 (patch)
treea7ac9d47897790a46fed0cd7bef64cb777b0c66e /source/blender/editors/space_view3d
parentef08e311343495448498cc4d6e03b4d024cf203c (diff)
add margin to view fitting view-all/local-view (wasn't obvious with the models I was testing with).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 434d8ee338b..d45013c40d9 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2238,7 +2238,7 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
lens = v3d->lens;
sensor_size = DEFAULT_SENSOR_WIDTH;
}
- size = ED_view3d_radius_to_persp_dist(focallength_to_fov(lens, sensor_size), size / 2.0f);
+ size = ED_view3d_radius_to_persp_dist(focallength_to_fov(lens, sensor_size), size / 2.0f) * VIEW3D_MARGIN;
/* do not zoom closer than the near clipping plane */
size = max_ff(size, v3d->near * 1.5f);
@@ -2250,7 +2250,7 @@ static void view3d_from_minmax(bContext *C, View3D *v3d, ARegion *ar,
}
else {
/* adjust zoom so it looks nicer */
- size = ED_view3d_radius_to_ortho_dist(v3d->lens, size / 2.0f);
+ size = ED_view3d_radius_to_ortho_dist(v3d->lens, size / 2.0f) * VIEW3D_MARGIN;
}
}
}
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index c241f77806e..ef15c1e734e 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1080,8 +1080,8 @@ static int view3d_localview_init(Main *bmain, Scene *scene, ScrArea *sa, ReportL
size = max_ff(size, v3d->near * 1.5f);
/* perspective size (we always switch out of camera view so no need to use its lens size) */
- size_persp = ED_view3d_radius_to_persp_dist(focallength_to_fov(v3d->lens, DEFAULT_SENSOR_WIDTH), size / 2.0f);
- size_ortho = ED_view3d_radius_to_ortho_dist(v3d->lens, size / 2.0f);
+ size_persp = ED_view3d_radius_to_persp_dist(focallength_to_fov(v3d->lens, DEFAULT_SENSOR_WIDTH), size / 2.0f) * VIEW3D_MARGIN;
+ size_ortho = ED_view3d_radius_to_ortho_dist(v3d->lens, size / 2.0f) * VIEW3D_MARGIN;
}
if (ok == TRUE) {