diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-25 17:15:37 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-25 17:16:35 +0300 |
commit | 1870e166deaa4ced1bb5226e97e037db10dbd06c (patch) | |
tree | 9d6e51e7b210efcde111ebf246211c2c44e9c8fe /source/blender/blenkernel/intern/lamp.c | |
parent | d9cc3ea2c6e8cfd17612c35a82050cb01d8070ec (diff) |
Cleanup: factorize the 'ensure local' part of datablock copy into a single BKE_id_copy_ensure_local function.
Diffstat (limited to 'source/blender/blenkernel/intern/lamp.c')
-rw-r--r-- | source/blender/blenkernel/intern/lamp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index 35fcf211b05..e9d039ad480 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -138,10 +138,7 @@ Lamp *BKE_lamp_copy(Main *bmain, Lamp *la) BKE_previewimg_id_copy(&lan->id, &la->id); - if (ID_IS_LINKED_DATABLOCK(la)) { - BKE_id_expand_local(&lan->id); - BKE_id_lib_local_paths(bmain, la->id.lib, &lan->id); - } + BKE_id_copy_ensure_local(bmain, &la->id, &lan->id); return lan; } |