Page MenuHome

Fix T94495: 'Split Edges' geometry node leads to a crash in edit mode
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Jan 3 2022, 6:17 PM.

Details

Summary

This was the case with the 'On Cage' option, for which we need an
ORIGINDEX layer. If this is not set up, in this particular case mesh
drawing gets screwed (it needs ORIGINDEX e.g. for selection drawing).

See extract_mesh_vbo_edit_data, bm_original_vert_get.

But there are many other places too that rely on an ORIGINDEX layer, and
while it might be debatable how useful an 'On Cage' option for geometry
nodes really is -- or if e.g. projection painting [which relies on it as
well] is really expected to work with geometry nodes --, we sure
shouldnt crash.

note: other geometry nodes seem to also not pay attention to this [e.g.
Dual Mesh], but they dont crash - just have weird selection behavior,
which is for another commit...

So now create the bmesh with corresponding custom data mask.

Diff Detail

Repository
rB Blender

Event Timeline

Hmm, while this looks reasonable, I don't think drawing code should crash when it doesn't have an original index layer, that's just not feasible in many cases.

source/blender/nodes/geometry/nodes/node_geo_edge_split.cc
40–43

Designated initializers work on Linux, but aren't part of the standard until C++20.

Thanks for the patch. I included this in a larger fix here: D14018