From 820a0f72403d882e75c19a15eb056d6001f8a58a Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 19 Dec 2023 12:34:56 +0100 Subject: [PATCH] Fix #116239: Propagate to Shapes overwrites all vertices with mirroring Since 4d0dbab5b1bf, `EDBM_verts_mirror_cache` is used to find mirror verts (but this was initialized with `use_select` being `true`, so the cache was only set up for selected verts). `EDBM_verts_mirror_get` behaves in a way that if you then query a vert that does not have a true mirror, it would always return the vert with index zero in this case (so basically would look like the index zero vert is the mirror for verts not covered in the cache). Now if that zero index vert happened to be selected, verts would not be skipped and the whole mesh would be overwritten. To solve this, we need to initialize the `EDBM_verts_mirror_cache` with `use_select` being `false` -- this way all verts are covered and we always get back the true mirror (checking selection on that one is fine then and everything behaves as expected). Pull Request: https://projects.blender.org/blender/blender/pulls/116329 --- source/blender/editors/mesh/editmesh_tools.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/mesh/editmesh_tools.cc b/source/blender/editors/mesh/editmesh_tools.cc index eec3818948c..e058b32c936 100644 --- a/source/blender/editors/mesh/editmesh_tools.cc +++ b/source/blender/editors/mesh/editmesh_tools.cc @@ -3760,7 +3760,7 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op) if (use_symmetry) { const bool use_topology = (mesh->editflag & ME_EDIT_MIRROR_TOPO) != 0; - EDBM_verts_mirror_cache_begin(em, 0, false, true, false, use_topology); + EDBM_verts_mirror_cache_begin(em, 0, false, false, false, use_topology); } if (shape_propagate(em, use_symmetry)) {