diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-21 19:27:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-21 19:27:43 +0300 |
commit | df1ba7da75f9b82f81693d5e0adfec29b2f4a424 (patch) | |
tree | 3953ecd6dd7d4525d7867fb51f0d1b29b995c415 | |
parent | 76adde8d19cbdf046048d49d40bd530e9440f842 (diff) |
make border zoom ignore backfaces in texture mode and zero alpha areas of billboards.
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 2 | ||||
-rw-r--r-- | source/blender/src/drawview.c | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 78605464268..06db6d099de 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -103,7 +103,7 @@ typedef struct View3D { /** * The drawing mode for the 3d display. Set to OB_WIRE, OB_SOLID, - * OB_SHADED or OB_TEXTURED */ + * OB_SHADED or OB_TEXTURE */ short drawtype; short localview; int lay, layact; diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index fa81bf2b17e..e0919c7ba1c 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -2894,14 +2894,21 @@ void draw_depth(ScrArea *sa, void *spacedata) View3D *v3d= spacedata; Base *base; Scene *sce; - short drawtype, zbuf; - + short drawtype, zbuf, flag; + float glalphaclip; /* temp set drawtype to solid */ + + /* Setting these temporarily is not nice */ drawtype = v3d->drawtype; zbuf = v3d->zbuf; - v3d->drawtype = OB_SOLID; - + flag = v3d->flag; + glalphaclip = U.glalphaclip; + U.glalphaclip = 0.5; /* not that nice but means we wont zoom into billboards */ + v3d->flag &= ~V3D_SELECT_OUTLINE; + if ((v3d->drawtype != OB_SOLID) && (v3d->drawtype != OB_TEXTURE)) + v3d->drawtype = OB_SOLID; + setwinmatrixview3d(sa->winx, sa->winy, NULL); /* 0= no pick rect */ setviewmatrixview3d(); /* note: calls where_is_object for camera... */ @@ -2980,6 +2987,8 @@ void draw_depth(ScrArea *sa, void *spacedata) v3d->drawtype = drawtype; v3d->zbuf = zbuf; + U.glalphaclip = glalphaclip; + v3d->flag = flag; } static void draw_viewport_fps(ScrArea *sa); |