Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/lamp.c3
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);
}