Fix T102961: mirrored vertices sometimes get locked in transform

Two vertices within the threshold can mirror each other causing neither
to be transformed.
This commit is contained in:
Germano Cavalcante 2022-12-05 19:10:54 -03:00
parent 0808eaf44e
commit 294e41477b
Notes: blender-bot 2023-02-13 22:37:44 +01:00
Referenced by issue #102961, Edit mode mirror function snapping issues
1 changed files with 6 additions and 0 deletions

View File

@ -1231,6 +1231,12 @@ void transform_convert_mesh_mirrordata_calc(struct BMEditMesh *em,
* It can happen when vertices occupy the same position. */
continue;
}
if (vert_map[i].flag & flag) {
/* It's already a mirror.
* Avoid a mirror vertex dependency cycle.
* This can happen when the vertices are within the mirror threshold. */
continue;
}
vert_map[i_mirr] = (struct MirrorDataVert){i, flag};
mirror_elem_len++;