From ccf0d22e92ccd3148326477a3e807261c3e9537c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 7 Jun 2022 15:29:01 +0200 Subject: Fix T98626: Mesh Deform modifier stops working on a linked collection upon undo. Regression from rBb66368f3fd9c, we still need to store all data on undo writes, since overrides are not re-applied after undo/redo. --- source/blender/modifiers/intern/MOD_meshdeform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_meshdeform.c') diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 0cff85d30ec..5dac31ac1df 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -584,8 +584,9 @@ static void panelRegister(ARegionType *region_type) static void blendWrite(BlendWriter *writer, const ID *id_owner, const ModifierData *md) { MeshDeformModifierData mmd = *(const MeshDeformModifierData *)md; + const bool is_undo = BLO_write_is_undo(writer); - if (ID_IS_OVERRIDE_LIBRARY(id_owner)) { + if (ID_IS_OVERRIDE_LIBRARY(id_owner) && !is_undo) { BLI_assert(!ID_IS_LINKED(id_owner)); const bool is_local = (md->flag & eModifierFlag_OverrideLibrary_Local) != 0; if (!is_local) { -- cgit v1.2.3