diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-07-10 17:15:59 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-07-12 11:48:27 +0300 |
commit | c4f9bfcf5e7ddfaeacdea6dc9b01868edf74182f (patch) | |
tree | 541b5e01094fc7fe48817045cc42edff662f550f /source | |
parent | 2289e26fa306c3edc60a6b5b776646c6fd1c33dc (diff) |
Fix T89765: boolean modifier collection refcount issue
The 'collection' property is flagged PROP_ID_REFCOUNT, so the
modifiers foreachIDLink functions should walk with IDWALK_CB_USER
(instead of IDWALK_CB_NOP).
Otherwise the modifier wont be included as a user for the collection
(e.g. on file read); removing the collection from the modifier will
decrement usercount though (which in worst case scenario makes the
collection orphan and will result in data loss)
Maniphest Tasks: T89765
Differential Revision: https://developer.blender.org/D11877
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.cc b/source/blender/modifiers/intern/MOD_boolean.cc index 4b9b24e4e47..bdb791dc8e7 100644 --- a/source/blender/modifiers/intern/MOD_boolean.cc +++ b/source/blender/modifiers/intern/MOD_boolean.cc @@ -109,7 +109,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u { BooleanModifierData *bmd = (BooleanModifierData *)md; - walk(userData, ob, (ID **)&bmd->collection, IDWALK_CB_NOP); + walk(userData, ob, (ID **)&bmd->collection, IDWALK_CB_USER); walk(userData, ob, (ID **)&bmd->object, IDWALK_CB_NOP); } |