[Bf-blender-cvs] [a5f950ed381] blender2.8: Fix MESH_OT_loop_select: Deselect object objects

Dalai Felinto noreply at git.blender.org
Fri Aug 31 22:44:21 CEST 2018


Commit: a5f950ed3814b7c09e388a976ec0e5dd325bedd2
Author: Dalai Felinto
Date:   Fri Aug 31 17:43:57 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBa5f950ed3814b7c09e388a976ec0e5dd325bedd2

Fix MESH_OT_loop_select: Deselect object objects

Before that if you loop select a mesh, it would deselect the previous selected
edges of the selected mesh, leaving the other objects untouched.

===================================================================

M	source/blender/editors/mesh/editmesh_select.c

===================================================================

diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 280b8f91151..2da79be2686 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -1782,6 +1782,28 @@ static bool mouse_mesh_loop(bContext *C, const int mval[2], bool extend, bool de
 		select_cycle = false;
 	}
 
+	if (select_clear) {
+		ViewLayer *view_layer = CTX_data_view_layer(C);
+		uint objects_len = 0;
+		Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len);
+		for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
+			Object *ob_iter = objects[ob_index];
+			BMEditMesh *em_iter = BKE_editmesh_from_object(ob_iter);
+
+			if (em_iter->bm->totvertsel == 0) {
+				continue;
+			}
+
+			if (em_iter == em) {
+				continue;
+			}
+
+			EDBM_flag_disable_all(em_iter, BM_ELEM_SELECT);
+			DEG_id_tag_update(ob_iter->data, DEG_TAG_SELECT_UPDATE);
+		}
+		MEM_freeN(objects);
+	}
+
 	if (em->selectmode & SCE_SELECT_FACE) {
 		mouse_mesh_loop_face(em, eed, select, select_clear);
 	}



More information about the Bf-blender-cvs mailing list