diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-06 09:01:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-06 09:01:24 +0400 |
commit | 06e3cadd8f48348f80a39dc71f2e4e85af94d0cd (patch) | |
tree | 7c4e9f4123b5ce63858844bce9e8761880ce9fd6 /source/blender/editors/space_view3d/drawmesh.c | |
parent | 2bfaf18d393be938d35ab5428d5eb2d3a70b191f (diff) |
fix for weight paint with face mask enabled drawing with lights.
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 546e5ccba5d..3cb55c0c10a 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -309,16 +309,24 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob) { unsigned char obcol[4]; - int istex, solidtex= 0; + int istex, solidtex; // XXX scene->obedit warning - if(v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) { + + /* texture draw is abused for mask selection mode, do this so wire draw + * with face selection in weight paint is not lit. */ + if((v3d->drawtype <= OB_WIRE) && (ob->mode & OB_MODE_WEIGHT_PAINT)) { + solidtex= FALSE; + Gtexdraw.islit= 0; + } + else if(v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) { /* draw with default lights in solid draw mode and edit mode */ - solidtex= 1; + solidtex= TRUE; Gtexdraw.islit= -1; } else { /* draw with lights in the scene otherwise */ + solidtex= FALSE; Gtexdraw.islit= GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp); } |