diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-01 12:29:46 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-12-01 12:29:46 +0300 |
commit | ff2a74906a7b70625a4e941c6a805f7734491204 (patch) | |
tree | 562f5ccdd9f4e377d20fe22eadca48201924b4b3 /source/blender/blenkernel/intern/object.c | |
parent | 73c1c92c0e86ce1b5a8abeaa16be2bf2c259412b (diff) | |
parent | 58877d6d082d82185ca611b704364168e5984bd7 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index f7257b2b0dd..432adfaef53 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1052,6 +1052,9 @@ void BKE_object_make_local_ex(Main *bmain, Object *ob, const bool lib_local, con ob_new->id.us = 0; ob_new->proxy = ob_new->proxy_from = ob_new->proxy_group = NULL; + /* setting newid is mandatory for complex make_lib_local logic... */ + ID_NEW_SET(ob, ob_new); + if (!lib_local) { BKE_libblock_remap(bmain, ob, ob_new, ID_REMAP_SKIP_INDIRECT_USAGE); } @@ -1184,7 +1187,10 @@ void BKE_object_make_proxy(Object *ob, Object *target, Object *gob) ob->type = target->type; ob->data = target->data; id_us_plus((ID *)ob->data); /* ensures lib data becomes LIB_TAG_EXTERN */ - + + /* copy vertex groups */ + defgroup_copy_list(&ob->defbase, &target->defbase); + /* copy material and index information */ ob->actcol = ob->totcol = 0; if (ob->mat) MEM_freeN(ob->mat); |