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:
authorCampbell Barton <ideasman42@gmail.com>2021-09-01 14:44:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-02 04:08:38 +0300
commitbaee000001f6a840f7aa15ad3834afc6639ef0f2 (patch)
treec01f2b88435dbf881389e07d03f995f727c01d5b
parentf8dd0d0dba748035706382f0c5700bb23e5a9048 (diff)
Fix T90798: calc_loop_triangles is not updated after joining objects
-rw-r--r--source/blender/editors/mesh/meshtools.c5
1 files changed, 5 insertions, 0 deletions
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");