diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-26 13:11:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-26 13:16:15 +0400 |
commit | 600248783b50ddef9b809b0d4c7abd9a9b20fda3 (patch) | |
tree | 2ec139a11d303d6555011384f6323c25e229acfd | |
parent | 44fc0ddee9eb893534ee6bc8df50af5b419b056e (diff) |
Fix T41355: Make-local looses linked modifiers texture
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ef4df8bd719..78f57b1b8bc 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1526,6 +1526,18 @@ Object *BKE_object_copy(Object *ob) return BKE_object_copy_ex(G.main, ob, false); } +static void extern_local_object__modifiersForeachIDLink( + void *UNUSED(userData), Object *UNUSED(ob), + ID **idpoin) +{ + if (*idpoin) { + /* intentionally omit ID_OB */ + if (ELEM(GS((*idpoin)->name), ID_IM, ID_TE)) { + id_lib_extern(*idpoin); + } + } +} + static void extern_local_object(Object *ob) { ParticleSystem *psys; @@ -1539,6 +1551,8 @@ static void extern_local_object(Object *ob) for (psys = ob->particlesystem.first; psys; psys = psys->next) id_lib_extern((ID *)psys->part); + + modifiers_foreachIDLink(ob, extern_local_object__modifiersForeachIDLink, NULL); } void BKE_object_make_local(Object *ob) |