diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2017-02-03 19:15:44 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2017-02-03 19:15:44 +0300 |
commit | 21f376780941f986e99db83793409c3222bca091 (patch) | |
tree | 192f6b61ebcecc09bb22c21202d04256d3b01fd2 /source/blender/editors | |
parent | 0b4a9caf51244fb85efea9d2fb41335f87cda762 (diff) |
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
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index ce3d903b8f6..091a5773cf0 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); } |