[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38481] branches/soc-2011-radish/source/ blender/editors/space_view3d: Fixed an indexing problem with the regular mouse vertex select in weight paint .
Jason Hays
jason_hays22 at mymail.eku.edu
Mon Jul 18 18:47:21 CEST 2011
Revision: 38481
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38481
Author: jason_hays22
Date: 2011-07-18 16:47:21 +0000 (Mon, 18 Jul 2011)
Log Message:
-----------
Fixed an indexing problem with the regular mouse vertex select in weight paint.
It will draw vertices in wire mode.
Modified Paths:
--------------
branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c
Modified: branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c 2011-07-18 15:12:35 UTC (rev 38480)
+++ branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c 2011-07-18 16:47:21 UTC (rev 38481)
@@ -2619,7 +2619,7 @@
Mesh *me = ob->data;
Material *ma= give_current_material(ob, 1);
const short hasHaloMat = (ma && (ma->material_type == MA_TYPE_HALO));
- const short is_paint_sel= (ob==OBACT && paint_facesel_test(ob));
+ const short is_paint_sel= (ob==OBACT && (paint_facesel_test(ob)));
int draw_wire = 0;
int /* totvert,*/ totedge, totface;
DerivedMesh *dm= mesh_get_derived_final(scene, ob, scene->customdata_mask);
@@ -2775,16 +2775,6 @@
glDisable(GL_LIGHTING);
GPU_disable_material();
- // Jason
- if(paint_vertsel_test(ob)) {
- glColor3f(0.0f, 0.0f, 0.0f);
- glPointSize(2.0f);
- dm->drawEdges(dm, (dt==OB_WIRE || totface==0), me->drawflag);
- glPointSize(3.0f);
- dm->drawSelectedVerts(dm);
- //draw_obmode_dm_verts(dm, 1);
- glPointSize(1.0f);
- }
}
else if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_TEXTURE_PAINT)) {
if(me->mcol)
@@ -2796,7 +2786,6 @@
}
}
}
-
/* set default draw color back for wire or for draw-extra later on */
if (dt!=OB_WIRE) {
if(base->flag & SELECT) {
@@ -2855,7 +2844,21 @@
bglPolygonOffset(rv3d->dist, 0.0);
}
}
-
+ // Jason
+ if(paint_vertsel_test(ob)) {
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glPointSize(2.0f);
+ // TODO clarify:
+ // there is clearly something I don't understand, when it was
+ // dt != OB_WIRE instead, it still drew in wire mode!
+ if(dt != OB_SOLID) {
+ dm->drawEdges(dm, (totface==0), TRUE);
+ }
+ glPointSize(3.0f);
+ dm->drawSelectedVerts(dm);
+ //draw_obmode_dm_verts(dm, 1);
+ glPointSize(1.0f);
+ }
dm->release(dm);
}
Modified: branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c 2011-07-18 15:12:35 UTC (rev 38480)
+++ branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c 2011-07-18 16:47:21 UTC (rev 38481)
@@ -1913,11 +1913,10 @@
WM_operator_properties_gesture_border(ot, TRUE);
}
/*Jason*/
-static void findnearestWPvert__doClosest(void *userData, MVert *mv, int x, int y, int index)
+static void findnearestWPvert__doClosest(void *userData, MVert *mv, int x, int y, int UNUSED(index))
{
struct { MVert *mv; short dist, select; int mval[2]; } *data = userData;
float temp = abs(data->mval[0]-x) + abs(data->mval[1]-y);
- mv = mv+index;
if((mv->flag & SELECT)==data->select)
temp += 5;
More information about the Bf-blender-cvs
mailing list