Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-18 19:34:00 +0300
committerHans Goudey <h.goudey@me.com>2022-02-18 19:34:00 +0300
commit82c3bef7655bb115f739842b815a2ee1c40a9320 (patch)
tree218d11a3f28d63958ae70d470bd0ec829c9f653d /source
parent1b47d07d7661b26b462f0e6fe87dabeb24d85168 (diff)
Fix T94495: Split edges node leads to a crash in edit mode
If original indices exist on the input mesh, also copy them to the BMesh used for the edge split operation so they aren't lost. Part of D14018
Diffstat (limited to 'source')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_edge_split.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc b/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
index 9376789cf2c..17503c3ea96 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
@@ -39,6 +39,9 @@ static Mesh *mesh_edge_split(const Mesh &mesh, const IndexMask selection)
BMesh *bm = BM_mesh_create(&allocsize, &bmesh_create_params);
BMeshFromMeshParams bmesh_from_mesh_params{};
+ bmesh_from_mesh_params.cd_mask_extra.vmask = CD_MASK_ORIGINDEX;
+ bmesh_from_mesh_params.cd_mask_extra.emask = CD_MASK_ORIGINDEX;
+ bmesh_from_mesh_params.cd_mask_extra.pmask = CD_MASK_ORIGINDEX;
BM_mesh_bm_from_me(bm, &mesh, &bmesh_from_mesh_params);
BM_mesh_elem_table_ensure(bm, BM_EDGE);