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
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-07-23 17:15:18 +0300
committerJacques Lucke <jacques@blender.org>2021-07-23 17:15:18 +0300
commiteb434778511070238ec189c8929c9b267842606a (patch)
tree548172286e198439e5d2aa9125021621947413e8 /source/blender/editors/space_view3d
parent239a74a130bdb917bed8889f518b4aa54a7b96c2 (diff)
Fix T89393: crash when selecting edges when geometry nodes has "on cage" turned on
The core problem is that the geometry nodes modifier sometimes support "mapping" (i.e. it remembers which new vertices correspond to edit mode vertices) and sometimes it does not, depending on what the nodes are doing. Also see rB07ce9910f7cc. The solution here is that the fallback case in `BKE_mesh_foreach_mapped_edge` does not call the callback with "invalid" indices. Differential Revision: https://developer.blender.org/D12007
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index c7a4030c402..20e00356152 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -439,7 +439,7 @@ void mesh_foreachScreenEdge(ViewContext *vc,
}
BM_mesh_elem_table_ensure(vc->em->bm, BM_EDGE);
- BKE_mesh_foreach_mapped_edge(me, mesh_foreachScreenEdge__mapFunc, &data);
+ BKE_mesh_foreach_mapped_edge(me, vc->em->bm->totedge, mesh_foreachScreenEdge__mapFunc, &data);
}
/** \} */
@@ -529,10 +529,11 @@ void mesh_foreachScreenEdge_clip_bb_segment(ViewContext *vc,
if ((clip_flag & V3D_PROJ_TEST_CLIP_BB) && (vc->rv3d->clipbb != NULL)) {
ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups. */
- BKE_mesh_foreach_mapped_edge(me, mesh_foreachScreenEdge_clip_bb_segment__mapFunc, &data);
+ BKE_mesh_foreach_mapped_edge(
+ me, vc->em->bm->totedge, mesh_foreachScreenEdge_clip_bb_segment__mapFunc, &data);
}
else {
- BKE_mesh_foreach_mapped_edge(me, mesh_foreachScreenEdge__mapFunc, &data);
+ BKE_mesh_foreach_mapped_edge(me, vc->em->bm->totedge, mesh_foreachScreenEdge__mapFunc, &data);
}
}