diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-11-08 05:30:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-11-08 05:30:46 +0300 |
commit | c300d58497f2eb51614e07101f7f08a25cc167a3 (patch) | |
tree | b4ff70a742ece6d7bea04151d703eae039ed8db5 /source/blender/editors/space_view3d/view3d_edit.c | |
parent | 615a2060c905196817dcf5020cc078418a955614 (diff) |
- when orbiting the view out of camera mode use the ortho/persp setting of the camera.
- display the physical size of a ortho camera since, unlike a perspective camera the ortho scale can be converted into a plane with real size.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d8913e494f3..7faaa8c6a3f 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -34,6 +34,7 @@ #include "DNA_armature_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_camera_types.h" #include "MEM_guardedalloc.h" @@ -737,10 +738,19 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* changed since 2.4x, use the camera view */ View3D *v3d = CTX_wm_view3d(C); - if(v3d->camera) - view3d_settings_from_ob(v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL); - vod->rv3d->persp= RV3D_PERSP; + if(v3d->camera) { + view3d_settings_from_ob(v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, NULL); + if(v3d->camera->type == OB_CAMERA) { + /* overwrite setting from above with cameras perspective */ + vod->rv3d->persp= (((Camera *)v3d->camera->data)->type==CAM_ORTHO) ? RV3D_ORTHO : RV3D_PERSP; + } + } + + /* if not overwritten above */ + if(vod->rv3d->persp==RV3D_CAMOB) { + vod->rv3d->persp= RV3D_PERSP; + } } ED_region_tag_redraw(vod->ar); } |