[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53482] trunk/blender/source/blender: fix for long standing annoyance with weight-paint mode selection.
Campbell Barton
ideasman42 at gmail.com
Tue Jan 1 14:08:17 CET 2013
Revision: 53482
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53482
Author: campbellbarton
Date: 2013-01-01 13:08:07 +0000 (Tue, 01 Jan 2013)
Log Message:
-----------
fix for long standing annoyance with weight-paint mode selection.
There was no selection flushing when faces or verts were selected, this allowed incorrect selection states like selected face with unselected vertices.
add flush commands to paintface_flush_flags() and paintvert_flush_flags()
Modified Paths:
--------------
trunk/blender/source/blender/editors/mesh/editface.c
trunk/blender/source/blender/makesrna/intern/rna_mesh.c
Modified: trunk/blender/source/blender/editors/mesh/editface.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editface.c 2013-01-01 12:51:08 UTC (rev 53481)
+++ trunk/blender/source/blender/editors/mesh/editface.c 2013-01-01 13:08:07 UTC (rev 53482)
@@ -69,9 +69,16 @@
int totface, totpoly;
int i;
- if (me == NULL || dm == NULL)
+ if (me == NULL)
return;
+ /* we could call this directly in all areas that change selection,
+ * since this could become slow for realtime updates (circle-select for eg) */
+ BKE_mesh_flush_select_from_polys(me);
+
+ if (dm == NULL)
+ return;
+
/*
* Try to push updated mesh poly flags to three other data sets:
* - Mesh polys => Mesh tess faces
@@ -603,9 +610,16 @@
int totvert;
int i;
- if (me == NULL || dm == NULL)
+ if (me == NULL)
return;
+ /* we could call this directly in all areas that change selection,
+ * since this could become slow for realtime updates (circle-select for eg) */
+ BKE_mesh_flush_select_from_verts(me);
+
+ if (dm == NULL)
+ return;
+
index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
dm_mvert = dm->getVertArray(dm);
Modified: trunk/blender/source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_mesh.c 2013-01-01 12:51:08 UTC (rev 53481)
+++ trunk/blender/source/blender/makesrna/intern/rna_mesh.c 2013-01-01 13:08:07 UTC (rev 53482)
@@ -154,7 +154,6 @@
Mesh *me = ptr->data;
if ((me->editflag & ME_EDIT_PAINT_VERT_SEL) && (me->editflag & ME_EDIT_PAINT_FACE_SEL)) {
me->editflag &= ~ME_EDIT_PAINT_FACE_SEL;
- BKE_mesh_flush_select_from_polys(me);
}
rna_Mesh_update_draw(bmain, scene, ptr);
}
@@ -164,7 +163,6 @@
Mesh *me = ptr->data;
if ((me->editflag & ME_EDIT_PAINT_VERT_SEL) && (me->editflag & ME_EDIT_PAINT_FACE_SEL)) {
me->editflag &= ~ME_EDIT_PAINT_VERT_SEL;
- BKE_mesh_flush_select_from_verts(me);
}
rna_Mesh_update_draw(bmain, scene, ptr);
}
More information about the Bf-blender-cvs
mailing list