diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-01 14:44:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-02 04:08:38 +0300 |
commit | baee000001f6a840f7aa15ad3834afc6639ef0f2 (patch) | |
tree | c01f2b88435dbf881389e07d03f995f727c01d5b /source/blender/editors/mesh | |
parent | f8dd0d0dba748035706382f0c5700bb23e5a9048 (diff) |
Fix T90798: calc_loop_triangles is not updated after joining objects
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 5 |
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"); |