Fix: Duplicate auto smooth modifier added by versioning in one case
commit7ba8fc17682f510df60fa726e66dde353a8d4322
authorHans Goudey <hans@blender.org>
Thu, 4 Apr 2024 15:57:21 +0000 (4 11:57 -0400)
committerHans Goudey <hans@blender.org>
Thu, 4 Apr 2024 15:57:27 +0000 (4 11:57 -0400)
treef167ede383a387b88f9c716c916331568c7288f5
parent11556bb9946c8d035eda0a490271b05a5344a381
Fix: Duplicate auto smooth modifier added by versioning in one case

When an object uses linked mesh data and the object and the modifier
node group are made local after versioning runs for the first time,
a new modifier is added every time the file is opened. An obvious
fix is to check whether there is already a modifier with the versioning
node group. In that case we can skip the object.

This doesn't fully fix the scenario from #120030; it requires that
the node group is made local so it doesn't leave a reference to
a non-existent library data-block.
source/blender/blenkernel/intern/mesh_legacy_convert.cc