From bc961c90a2fffa1323036c30cb7db69e1c40537d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 Jun 2012 09:04:45 +0000 Subject: fix for armature specular material color overriding the wire color when instanced in a dupli --- source/blender/editors/space_view3d/drawmesh.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_view3d/drawmesh.c') diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index de1d9f22667..19696b2b0e0 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -1015,14 +1015,14 @@ void draw_mesh_paint(View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *d if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) { if (do_light) { + const float spec[4] = {0.47f, 0.47f, 0.47f, 0.47f}; + /* enforce default material settings */ GPU_enable_material(0, NULL); /* but set default spec */ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); - glEnable(GL_COLOR_MATERIAL); /* according manpages needed */ - glColor3ub(120, 120, 120); - glDisable(GL_COLOR_MATERIAL); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); /* diffuse */ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); -- cgit v1.2.3