[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40207] branches/soc-2011-radish/source/ blender/editors: fix for a bug painting on selected verts, also fix an error in my own recent commit.
Campbell Barton
ideasman42 at gmail.com
Wed Sep 14 14:44:22 CEST 2011
Revision: 40207
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40207
Author: campbellbarton
Date: 2011-09-14 12:44:21 +0000 (Wed, 14 Sep 2011)
Log Message:
-----------
fix for a bug painting on selected verts, also fix an error in my own recent commit.
Modified Paths:
--------------
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
Modified: branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 2011-09-14 08:45:12 UTC (rev 40206)
+++ branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 2011-09-14 12:44:21 UTC (rev 40207)
@@ -442,7 +442,7 @@
faceverts[2]= mface->v3;
faceverts[3]= mface->v4;
for (i=0; i<3 || faceverts[i]; i++) {
- if(me->dvert[faceverts[i]].flag) {
+ if(!me->dvert[faceverts[i]].flag) {
// Jason
if(use_vert_sel && ((me->mvert[faceverts[i]].flag & SELECT) == 0)) {
continue;
@@ -1927,10 +1927,16 @@
mval[1]-= vc->ar->winrct.ymin;
swap_m4m4(wpd->vc.rv3d->persmat, mat);
-
+
+ // Jason
+ use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+
/* which faces are involved */
if(wp->flag & VP_AREA) {
+ // Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell
+ me->editflag &= ~ME_EDIT_VERT_SEL;
totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size(brush));
+ me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0;
}
else {
indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
@@ -1949,9 +1955,7 @@
}
}
}
- // Jason
- use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
-
+
if((me->editflag & ME_EDIT_PAINT_MASK) && me->mface) {
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totface) {
Modified: branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c 2011-09-14 08:45:12 UTC (rev 40206)
+++ branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c 2011-09-14 12:44:21 UTC (rev 40207)
@@ -6719,7 +6719,6 @@
Mesh *me= ob->data;
if(me->editflag & ME_EDIT_VERT_SEL) {
DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
- WM_set_framebuffer_index_color(me->totvert+2);
glColor3ub(0, 0, 0);
dm->drawMappedFaces(dm, bbs_mesh_solid_hide2__setDrawOpts, me, 0, GPU_enable_material, NULL);
More information about the Bf-blender-cvs
mailing list