[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40823] trunk/blender/source/blender/ editors/space_view3d/drawmesh.c: fix for weight paint with face mask enabled drawing with lights.
Campbell Barton
ideasman42 at gmail.com
Thu Oct 6 07:01:25 CEST 2011
Revision: 40823
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40823
Author: campbellbarton
Date: 2011-10-06 05:01:24 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
fix for weight paint with face mask enabled drawing with lights.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_view3d/drawmesh.c
Modified: trunk/blender/source/blender/editors/space_view3d/drawmesh.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2011-10-06 04:40:18 UTC (rev 40822)
+++ trunk/blender/source/blender/editors/space_view3d/drawmesh.c 2011-10-06 05:01:24 UTC (rev 40823)
@@ -309,16 +309,24 @@
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);
}
More information about the Bf-blender-cvs
mailing list