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>2007-10-24 22:58:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-10-24 22:58:26 +0400
commit6c54cd87ce628e3de0630a46d8b313c544472c29 (patch)
tree3766fd3f4979a90b3ce2d0285e9e4bbee40f18b3 /source/blender/src/drawobject.c
parent30be716fc8e0ada286a94a53bf64dc5d16402c24 (diff)
* Changing images in the UV view didnt work properly - reported as bug 7467 (own error, broke on UV in editmode conversion)
* when setting the face, images with alpha's will set the texface's alpha option. * added a draw even to redraw view3d and uv/image view - so the Draw Faces button redraws properly. * made a macro for checking if the object will draw with textures * textured meshes in editmode only draw a selected face overlay (otherwise the entire mesh would get a plue tint wich isnt nice for viewing textures), the selected highlight is still there, this is how Face/UV mode looked. * Alpha clipping STILL had a case where it wasnt disabled and the interface had its alpha clipped, this should be fixed now.
Diffstat (limited to 'source/blender/src/drawobject.c')
-rw-r--r--source/blender/src/drawobject.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index a64a49a7268..556126c7518 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -2026,9 +2026,7 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
EM_init_index_arrays(1, 1, 1);
if(dt>OB_WIRE) {
- if( (G.vd->drawtype==OB_TEXTURE && dt>OB_SOLID) ||
- (G.vd->drawtype==OB_SOLID && G.vd->flag2 & V3D_SOLID_TEX)
- ) {
+ if( CHECK_OB_DRAWTEXTURE(G.vd, dt) ) {
draw_mesh_textured(ob, finalDM, 0);
} else {
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
@@ -2066,6 +2064,10 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
glEnable(GL_BLEND);
glDepthMask(0); // disable write in zbuffer, needed for nice transp
+ /* dont draw unselected faces, only selected, this is MUCH nicer when texturing */
+ if CHECK_OB_DRAWTEXTURE(G.vd, dt)
+ col1[3] = 0;
+
draw_dm_faces_sel(cageDM, col1, col2, col3, efa_act);
glDisable(GL_BLEND);
@@ -2089,10 +2091,7 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
}
/* here starts all fancy draw-extra over */
- if( (G.f & G_DRAWEDGES)==0 &&
- ((G.vd->drawtype==OB_TEXTURE && dt>OB_SOLID) ||
- (G.vd->drawtype==OB_SOLID && G.vd->flag2 & V3D_SOLID_TEX))
- ) {
+ if((G.f & G_DRAWEDGES)==0 && CHECK_OB_DRAWTEXTURE(G.vd, dt)) {
/* we are drawing textures and 'G_DRAWEDGES' is disabled, dont draw any edges */
/* only draw selected edges otherwise there is no way of telling if a face is selected */
@@ -2242,8 +2241,7 @@ static void draw_mesh_fancy(Base *base, int dt, int flag)
draw_wire = 1;
}
else if( (ob==OBACT && (G.f & G_TEXTUREPAINT || FACESEL_PAINT_TEST)) ||
- (G.vd->drawtype==OB_TEXTURE && dt>OB_SOLID) ||
- (G.vd->drawtype==OB_SOLID && G.vd->flag2 & V3D_SOLID_TEX))
+ CHECK_OB_DRAWTEXTURE(G.vd, dt))
{
int faceselect= (ob==OBACT && FACESEL_PAINT_TEST);