Fix: duplicate modifier uids with overrides
Keep the `persistent_uid` that is already known to be unique on `ob_dst` instead of copying the one from `md_src` which may not be unique in `ob_dst`. Pull Request: https://projects.blender.org/blender/blender/pulls/117942
This commit is contained in:
@@ -1865,7 +1865,9 @@ bool rna_Object_modifiers_override_apply(Main *bmain,
|
||||
ParticleSystem *psys_dst = (mod_dst->type == eModifierType_ParticleSystem) ?
|
||||
(reinterpret_cast<ParticleSystemModifierData *>(mod_dst))->psys :
|
||||
nullptr;
|
||||
const int persistent_uid = mod_dst->persistent_uid;
|
||||
BKE_modifier_copydata(mod_src, mod_dst);
|
||||
mod_dst->persistent_uid = persistent_uid;
|
||||
if (mod_dst->type == eModifierType_ParticleSystem) {
|
||||
psys_dst->flag &= ~PSYS_DELETE;
|
||||
(reinterpret_cast<ParticleSystemModifierData *>(mod_dst))->psys = psys_dst;
|
||||
|
||||
Reference in New Issue
Block a user