diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-21 07:11:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-21 07:33:10 +0300 |
commit | e0611ca832d793694cbda0fbae1a4388b81fc589 (patch) | |
tree | 5eb3bbb2a0f11bfb7c66d0e19b8bb808c0689436 /source/blender/editors/include | |
parent | e88cfc28b24e1c6c1d67858a6bc930389e0041ea (diff) |
View3D: fix view-selected zoom logic
- Correct logic converting radius to view distance.
- Wasn't taking view-zoom into account converting lens to angle.
- Support framing the selection in the camera bounds (for camera locked views).
Add ED_view3d_radius_to_dist to handles these details.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 11f961605af..ec53bce2eb7 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -252,8 +252,12 @@ void ED_view3d_clipping_disable(void); float ED_view3d_pixel_size(struct RegionView3D *rv3d, const float co[3]); -float ED_view3d_radius_to_persp_dist(const float angle, const float radius); -float ED_view3d_radius_to_ortho_dist(const float lens, const float radius); +float ED_view3d_radius_to_dist_persp(const float angle, const float radius); +float ED_view3d_radius_to_dist_ortho(const float lens, const float radius); +float ED_view3d_radius_to_dist( + const struct View3D *v3d, const struct ARegion *ar, + const char persp, const bool use_aspect, + const float radius); void drawcircball(int mode, const float cent[3], float rad, float tmat[4][4]); |