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>2012-04-25 03:47:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-25 03:47:10 +0400
commit0943f4bc775f960251aa4acf62d84887007ad58a (patch)
treef53372c8cdfb100e05e9e87e7035cece2b7fab3e
parent48893dba2459580ff73f04196e44342b56c0a035 (diff)
now vertex paint uses the same overrides as weight paint - so wire draw mode allows vertex paint to be unlit (which is quite handy, previously you had to hide lamps).
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c4
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 3b5ebbee42a..f5f3b4c3f16 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -349,7 +349,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
/* 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)) {
+ if ((v3d->drawtype <= OB_WIRE) && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT))) {
solidtex = FALSE;
Gtexdraw.islit = 0;
}
@@ -953,7 +953,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o
glEnable(GL_LIGHTING);
- if (ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
/* weight paint mode exception */
dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_material,
GPU_enable_material, NULL, ob->data, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index effaa405218..4508dae36e7 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3306,7 +3306,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
}
}
else if (dt == OB_SOLID) {
- if (is_obact && ob->mode & OB_MODE_WEIGHT_PAINT) {
+ if (is_obact && ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
/* weight paint in solid mode, special case. focus on making the weights clear
* rather than the shading, this is also forced in wire view */
GPU_enable_material(0, NULL);