forked from bartvdbraak/blender
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()
This commit is contained in:
parent
1db74622ce
commit
1692f17c9b
@ -69,7 +69,14 @@ void paintface_flush_flags(Object *ob)
|
||||
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;
|
||||
|
||||
/*
|
||||
@ -603,7 +610,14 @@ void paintvert_flush_flags(Object *ob)
|
||||
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);
|
||||
|
@ -154,7 +154,6 @@ static void rna_Mesh_update_vertmask(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
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 @@ static void rna_Mesh_update_facemask(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user