diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 21:16:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-11 22:30:02 +0300 |
commit | c3996b792a75b867491c345661c8a5271101866c (patch) | |
tree | a4acb4f02d5b0debff5d1b7d3ce61142ff4d8fef /source/blender/blenkernel/intern/lamp.c | |
parent | eac7faa0e6a91ba17dcaad78c581e2061fd000e6 (diff) |
Revert 'use new BKE_id_expand_local()' change for Lamp's copy function.
ntree is once more time a PITA - actually, all sub-IDs that get copied together with the 'main' one are
(shapekey was workedaround, as was animdata/action issue, but nodes are more touchy).
For now, better not to touch that, needs careful check & rethink.
Diffstat (limited to 'source/blender/blenkernel/intern/lamp.c')
-rw-r--r-- | source/blender/blenkernel/intern/lamp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index e1aec61d3f6..a26ada8c52a 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -127,6 +127,7 @@ Lamp *BKE_lamp_copy(Main *bmain, Lamp *la) if (lan->mtex[a]) { lan->mtex[a] = MEM_mallocN(sizeof(MTex), "copylamptex"); memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex)); + id_us_plus((ID *)lan->mtex[a]->tex); } } @@ -137,8 +138,6 @@ Lamp *BKE_lamp_copy(Main *bmain, Lamp *la) lan->preview = BKE_previewimg_copy(la->preview); - BKE_id_expand_local(&lan->id, true); - if (ID_IS_LINKED_DATABLOCK(la)) { BKE_id_lib_local_paths(bmain, la->id.lib, &lan->id); } |