Fix T61360: Weight paint tools ignore face select

Face selection was added in weight paint mode since 2.7x,
however tools hadn't been updated.
This commit is contained in:
Campbell Barton 2019-02-14 11:47:23 +11:00
parent 6c2a0049e4
commit a8134647c9
Notes: blender-bot 2023-02-14 04:07:50 +01:00
Referenced by issue #61360, Smooth Vertex Weights operator affects ALL objects that are in weight paint mode(even deselected ones)
1 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,9 @@ static bool vertex_group_use_vert_sel(Object *ob)
if (ob->mode == OB_MODE_EDIT) {
return true;
}
else if (ob->type == OB_MESH && ((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_VERT_SEL) {
else if ((ob->type == OB_MESH) &&
((Mesh *)ob->data)->editflag & (ME_EDIT_PAINT_VERT_SEL | ME_EDIT_PAINT_FACE_SEL))
{
return true;
}
else {