diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-18 19:34:00 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-18 19:34:00 +0300 |
commit | 82c3bef7655bb115f739842b815a2ee1c40a9320 (patch) | |
tree | 218d11a3f28d63958ae70d470bd0ec829c9f653d /source | |
parent | 1b47d07d7661b26b462f0e6fe87dabeb24d85168 (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.cc | 3 |
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); |