[Bf-blender-cvs] [bc675d90d0a] master: Fix T55745: Pick Shortest Path tool, inconsistent selection.

Bastien Montagne noreply at git.blender.org
Mon Aug 13 17:48:55 CEST 2018


Commit: bc675d90d0a17bbd5e52b2549c4e504366052c22
Author: Bastien Montagne
Date:   Mon Aug 13 17:40:44 2018 +0200
Branches: master
https://developer.blender.org/rBbc675d90d0a17bbd5e52b2549c4e504366052c22

Fix T55745: Pick Shortest Path tool, inconsistent selection.

To get consistent, user-expected results here, we need to 'fake'
starting immediately after a 'skip' block (such that we start with a
full block of selected elements).

Same issue affected vertices and edges selection of course, did not
check the other usages of WM_operator_properties_checker_interval_test()
though.

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

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

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

diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index bf5a7e3a053..eccc15bf83f 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -176,7 +176,8 @@ static void mouse_mesh_shortest_path_vert(
 			}
 		} while ((node = node->next));
 
-		int depth = 1;
+		/* We need to start as if just *after* a 'skip' block... */
+		int depth = op_params->interval_params.skip;
 		node = path;
 		do {
 			if ((is_path_ordered == false) ||
@@ -366,7 +367,8 @@ static void mouse_mesh_shortest_path_edge(
 			}
 		} while ((node = node->next));
 
-		int depth = 1;
+		/* We need to start as if just *after* a 'skip' block... */
+		int depth = op_params->interval_params.skip;
 		node = path;
 		do {
 			if ((is_path_ordered == false) ||
@@ -511,7 +513,8 @@ static void mouse_mesh_shortest_path_face(
 			}
 		} while ((node = node->next));
 
-		int depth = 1;
+		/* We need to start as if just *after* a 'skip' block... */
+		int depth = op_params->interval_params.skip;
 		node = path;
 		do {
 			if ((is_path_ordered == false) ||



More information about the Bf-blender-cvs mailing list