diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-03 07:26:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-03 07:53:31 +0300 |
commit | 81c2fd25e5be3781285298e1ded16fb591da24e0 (patch) | |
tree | 649d16bc0a81d88f3fc4c6e669d7718728eb7910 /source/blender/editors/mesh/editmesh_select.c | |
parent | ff3601b9aed6ed4a711271b71d66629e79eba7db (diff) |
Fix T58528: Assign material skips non-active
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 1191874b9a7..c8c82680386 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -2570,18 +2570,21 @@ bool EDBM_selectmode_disable( /** \name Select Toggle * \{ */ -void EDBM_deselect_by_material(BMEditMesh *em, const short index, const bool select) +bool EDBM_deselect_by_material(BMEditMesh *em, const short index, const bool select) { BMIter iter; BMFace *efa; + bool changed = false; BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) continue; if (efa->mat_nr == index) { + changed = true; BM_face_select_set(em->bm, efa, select); } } + return changed; } void EDBM_select_toggle_all(BMEditMesh *em) /* exported for UV */ |