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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-30 21:54:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-30 21:54:36 +0300
commite1700aa6c94d34b6e96571506207d660686d6003 (patch)
tree0fe7b221956d543b16023e9de631ff1b4ff4a90f /source
parentf7b7d7952d5edc22e717ab20a96f77cb3c1be87b (diff)
[#20320] Quad View - Orthogonal grid changes to perspective grid
- respect view locking (dont change rv3d->view) - on multiple calls to smoothview, get the original view from the previously called smoothview if it exists.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index a83d226ae79..c4f5f37c5e5 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -282,9 +282,12 @@ void smooth_view(bContext *C, Object *oldcamera, Object *camera, float *ofs, flo
sms.orig_lens= v3d->lens;
}
/* grid draw as floor */
- sms.orig_view= rv3d->view;
- rv3d->view= 0;
-
+ if((rv3d->viewlock & RV3D_LOCKED)==0) {
+ /* use existing if exists, means multiple calls to smooth view wont loose the original 'view' setting */
+ sms.orig_view= rv3d->sms ? rv3d->sms->orig_view : rv3d->view;
+ rv3d->view= 0;
+ }
+
/* ensure it shows correct */
if(sms.to_camera) rv3d->persp= RV3D_PERSP;
@@ -344,8 +347,11 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *op, wmEvent *event)
rv3d->dist = sms->new_dist;
v3d->lens = sms->new_lens;
}
- rv3d->view= sms->orig_view;
+ if((rv3d->viewlock & RV3D_LOCKED)==0) {
+ rv3d->view= sms->orig_view;
+ }
+
MEM_freeN(rv3d->sms);
rv3d->sms= NULL;