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>2014-01-28 20:39:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-28 20:39:19 +0400
commitd34d7451a9ef52f01e03755b8d2a8931ce8d903e (patch)
tree7196773a3c3c9bf904d3adb3f9b1770d14e3e44c /source/blender/editors
parent90ff9d7dcaa33454b99c1165405cb14a1ead0f7c (diff)
Viewport Drawing: apply matcaps to all objects
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index f4619e3c4cd..1214a1bfe02 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -6657,7 +6657,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
int i, selstart, selend, empty_object = 0;
short dtx;
char dt;
- short zbufoff = 0;
+ bool zbufoff = false, is_paint = false;
const bool is_obact = (ob == OBACT);
const bool render_override = (v3d->flag2 & V3D_RENDER_OVERRIDE) != 0;
bool particle_skip_object = false; /* Draw particles but not their emitter object. */
@@ -6761,21 +6761,22 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
if (dt < OB_SOLID) {
zbufoff = 1;
dt = OB_SOLID;
+ is_paint = true;
}
if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) {
dt = OB_PAINT;
+ is_paint = true;
}
glEnable(GL_DEPTH_TEST);
}
}
- else {
- /* matcap check - only when not painting color */
- if ((v3d->flag2 & V3D_SOLID_MATCAP) && (dt == OB_SOLID)) {
- draw_object_matcap_check(v3d, ob);
- }
- }
+ }
+
+ /* matcap check - only when not painting color */
+ if ((v3d->flag2 & V3D_SOLID_MATCAP) && (dt == OB_SOLID) && (is_paint == false)) {
+ draw_object_matcap_check(v3d, ob);
}
/* draw-extra supported for boundbox drawmode too */