From 1870e166deaa4ced1bb5226e97e037db10dbd06c Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 25 Jul 2016 16:15:37 +0200 Subject: Cleanup: factorize the 'ensure local' part of datablock copy into a single BKE_id_copy_ensure_local function. --- source/blender/blenkernel/intern/lamp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/blenkernel/intern/lamp.c') 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; } -- cgit v1.2.3