From baee000001f6a840f7aa15ad3834afc6639ef0f2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 Sep 2021 21:44:32 +1000 Subject: Fix T90798: calc_loop_triangles is not updated after joining objects --- source/blender/editors/mesh/meshtools.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 27fb21e1dfb..1b720f2c14d 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -424,6 +424,11 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op) /* remove tessface to ensure we don't hold references to invalid faces */ BKE_mesh_tessface_clear(me); + /* Clear any run-time data. + * Even though this mesh wont typically have run-time data, the Python API can for e.g. + * create loop-triangle cache here, which is confusing when left in the mesh, see: T90798. */ + BKE_mesh_runtime_clear_geometry(me); + /* new material indices and material array */ if (totmat) { matar = MEM_callocN(sizeof(*matar) * totmat, "join_mesh matar"); -- cgit v1.2.3