[Bf-blender-cvs] [21f3767809] master: fix T46892: snap to closest point now works with Individual Origins

Germano Cavalcante noreply at git.blender.org
Fri Feb 3 17:15:57 CET 2017


Commit: 21f376780941f986e99db83793409c3222bca091
Author: Germano Cavalcante
Date:   Fri Feb 3 13:15:44 2017 -0300
Branches: master
https://developer.blender.org/rB21f376780941f986e99db83793409c3222bca091

fix T46892: snap to closest point now works with Individual Origins

The code looks for the closest element between its centers. In the case of islands, the center of each vertex is the center of the island.
The solution here is to skip the search for islands when the operation is translation

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index ce3d903b8f..091a5773cf 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2393,7 +2393,12 @@ static void createTransEditVerts(TransInfo *t)
 		editmesh_set_connectivity_distance(em->bm, mtx, dists);
 	}
 
-	if (t->around == V3D_AROUND_LOCAL_ORIGINS) {
+	/* Only in case of rotation and resize, we want the elements of the edited
+	 * object to behave as groups whose pivot are the individual origins
+	 *
+	 * TODO: use island_info to detect the closest point when the "Snap Target"
+	 * in Blender UI is "Closest" */
+	if ((t->around == V3D_AROUND_LOCAL_ORIGINS) && (t->mode != TFM_TRANSLATION)) {
 		island_info = editmesh_islands_info_calc(em, &island_info_tot, &island_vert_map);
 	}




More information about the Bf-blender-cvs mailing list