Fix T69834 Edit Mesh: Multi-object edit crash when an instance is hidden

This was caused by a missing tag of the mesh datablock.
This commit is contained in:
Clément Foucault 2020-02-05 17:22:36 +01:00
parent 994e9f702f
commit 0a95a0852e
Notes: blender-bot 2023-02-14 06:05:22 +01:00
Referenced by issue #73675, rB0a95a0852eb1 tags all objects in a scene for depsgraph update when leaving edit mode, causing significant lag.
Referenced by issue #69834,  Crash: Multi-object edit containing a (multiuser) mesh that is also used by an object in a hidden collection destroys CustomData layer
1 changed files with 2 additions and 0 deletions

View File

@ -544,6 +544,8 @@ bool ED_object_editmode_exit_ex(Main *bmain, Scene *scene, Object *obedit, int f
if (UNLIKELY(obedit && obedit->mode & OB_MODE_EDIT)) {
obedit->mode &= ~OB_MODE_EDIT;
}
/* Also happens when mesh is shared across multiple objects. [#T69834] */
DEG_id_tag_update(&obedit->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
return true;
}