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
This commit is contained in:
parent
1b47d07d76
commit
82c3bef765
Notes:
blender-bot
2023-02-14 08:07:50 +01:00
Referenced by issue #94495, Geometry nodes: Split edges node leads to a crash in edit mode
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue