[Bf-blender-cvs] [82c3bef7655] blender-v3.1-release: Fix T94495: Split edges node leads to a crash in edit mode

Hans Goudey noreply at git.blender.org
Fri Feb 18 17:34:12 CET 2022


Commit: 82c3bef7655bb115f739842b815a2ee1c40a9320
Author: Hans Goudey
Date:   Fri Feb 18 10:34:00 2022 -0600
Branches: blender-v3.1-release
https://developer.blender.org/rB82c3bef7655bb115f739842b815a2ee1c40a9320

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

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_edge_split.cc

===================================================================

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);



More information about the Bf-blender-cvs mailing list