[Bf-blender-cvs] [baee000001f] master: Fix T90798: calc_loop_triangles is not updated after joining objects
Campbell Barton
noreply at git.blender.org
Thu Sep 2 03:47:20 CEST 2021
Commit: baee000001f6a840f7aa15ad3834afc6639ef0f2
Author: Campbell Barton
Date: Wed Sep 1 21:44:32 2021 +1000
Branches: master
https://developer.blender.org/rBbaee000001f6a840f7aa15ad3834afc6639ef0f2
Fix T90798: calc_loop_triangles is not updated after joining objects
===================================================================
M source/blender/editors/mesh/meshtools.c
===================================================================
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");
More information about the Bf-blender-cvs
mailing list