[Bf-blender-cvs] [7a7c9ee71a7] blender2.8: Fix uv lasso/box multi-object select logic

Campbell Barton noreply at git.blender.org
Fri Nov 23 08:09:16 CET 2018


Commit: 7a7c9ee71a7b73f3c26e554ce11096abce77b874
Author: Campbell Barton
Date:   Fri Nov 23 18:06:50 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB7a7c9ee71a7b73f3c26e554ce11096abce77b874

Fix uv lasso/box multi-object select logic

Was de-selecting all UV's on each iteration.

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

M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/windowmanager/intern/wm_operator_props.c

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

diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 30c0bc741c2..50b7290e8fb 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -3205,6 +3205,10 @@ static int uv_box_select_exec(bContext *C, wmOperator *op)
 	uint objects_len = 0;
 	Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(view_layer, &objects_len);
 
+	if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
+		uv_select_all_perform_multi(scene, ima, objects, objects_len, SEL_DESELECT);
+	}
+
 	/* don't indent to avoid diff noise! */
 	for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
 		Object *obedit = objects[ob_index];
@@ -3214,10 +3218,6 @@ static int uv_box_select_exec(bContext *C, wmOperator *op)
 
 		const int cd_loop_uv_offset  = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
 
-		if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
-			uv_select_all_perform_multi(scene, ima, objects, objects_len, SEL_DESELECT);
-		}
-
 		/* do actual selection */
 		if (use_face_center && !pinned) {
 			/* handle face selection mode */
@@ -3486,6 +3486,10 @@ static bool do_lasso_select_mesh_uv(
 	uint objects_len = 0;
 	Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs(view_layer, &objects_len);
 
+	if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
+		uv_select_all_perform_multi(scene, ima, objects, objects_len, SEL_DESELECT);
+	}
+
 	/* don't indent to avoid diff noise! */
 	for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
 		Object *obedit = objects[ob_index];
@@ -3496,10 +3500,6 @@ static bool do_lasso_select_mesh_uv(
 
 		const int cd_loop_uv_offset  = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
 
-		if (SEL_OP_USE_PRE_DESELECT(sel_op)) {
-			uv_select_all_perform_multi(scene, ima, objects, objects_len, SEL_DESELECT);
-		}
-
 		if (use_face_center) { /* Face Center Sel */
 			BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
 				BM_elem_flag_disable(efa, BM_ELEM_TAG);
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index 11aef46096a..cb69d584372 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -279,7 +279,7 @@ void WM_operator_properties_select_operation(wmOperatorType *ot)
 	RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
-/* Some tools don't support XOR/END */
+/* Some tools don't support XOR/AND. */
 void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
 {
 	static const EnumPropertyItem select_mode_items[] = {



More information about the Bf-blender-cvs mailing list