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>2010-11-08 06:44:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-08 06:44:52 +0300
commit85b9652258f515b7d0f0133df9166c4aae6136af (patch)
treec5dd63d580eacb9980a57f39f59e4d2a93ca6ed1 /source/blender/editors/space_view3d/view3d_edit.c
parentc300d58497f2eb51614e07101f7f08a25cc167a3 (diff)
fix for glitches with quad-split view.
- Home or Numpad Period with smoothview disabled were not syncing up the other views. - Disabling clip only disabled clip syncing but left clip enabled for all views. - Clip was being calculated for every update even when not enabled. - The perspective view was being used to copy settings from when changing box & clip settings, resetting the distance each time. Now use one of the aligned views instead.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c39
1 files changed, 32 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 7faaa8c6a3f..24e1c08617e 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -159,6 +159,7 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar)
{
ARegion *artest;
RegionView3D *rv3d= ar->regiondata;
+ short clip= 0;
for(artest= sa->regionbase.first; artest; artest= artest->next) {
if(artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) {
@@ -186,11 +187,16 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar)
rv3dtest->ofs[2]= rv3d->ofs[2];
}
+ clip |= rv3dtest->viewlock & RV3D_BOXCLIP;
+
ED_region_tag_redraw(artest);
}
}
}
- view3d_boxview_clip(sa);
+
+ if(clip) {
+ view3d_boxview_clip(sa);
+ }
}
/* for home, center etc */
@@ -198,6 +204,7 @@ void view3d_boxview_copy(ScrArea *sa, ARegion *ar)
{
ARegion *artest;
RegionView3D *rv3d= ar->regiondata;
+ short clip= 0;
for(artest= sa->regionbase.first; artest; artest= artest->next) {
if(artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) {
@@ -207,17 +214,23 @@ void view3d_boxview_copy(ScrArea *sa, ARegion *ar)
rv3dtest->dist= rv3d->dist;
copy_v3_v3(rv3dtest->ofs, rv3d->ofs);
ED_region_tag_redraw(artest);
+
+ clip |= rv3dtest->viewlock & RV3D_BOXCLIP;
}
}
}
- view3d_boxview_clip(sa);
+
+ if(clip) {
+ view3d_boxview_clip(sa);
+ }
}
-void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar)
+/* 'clip' is used to know if our clip setting has changed */
+void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar, short do_clip)
{
+ ARegion *arsync= NULL;
RegionView3D *rv3d= ar->regiondata;
short viewlock;
-
/* this function copies flags from the first of the 3 other quadview
regions to the 2 other, so it assumes this is the region whose
properties are always being edited, weak */
@@ -225,18 +238,30 @@ void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar)
if((viewlock & RV3D_LOCKED)==0)
viewlock= 0;
- else if((viewlock & RV3D_BOXVIEW)==0)
+ else if((viewlock & RV3D_BOXVIEW)==0) {
viewlock &= ~RV3D_BOXCLIP;
+ do_clip= TRUE;
+ }
for(; ar; ar= ar->prev) {
if(ar->alignment==RGN_ALIGN_QSPLIT) {
rv3d= ar->regiondata;
rv3d->viewlock= viewlock;
+
+ if(do_clip && (viewlock & RV3D_BOXCLIP)==0) {
+ rv3d->rflag &= ~RV3D_BOXCLIP;
+ }
+
+ /* use arsync so we sync with one of the aligned views below
+ * else the view jumps on changing view settings like 'clip'
+ * since it copies from the perspective view */
+ arsync= ar;
}
}
- if(rv3d->viewlock & RV3D_BOXVIEW)
- view3d_boxview_copy(sa, sa->regionbase.last);
+ if(rv3d->viewlock & RV3D_BOXVIEW) {
+ view3d_boxview_copy(sa, arsync ? arsync : sa->regionbase.last);
+ }
ED_area_tag_redraw(sa);
}