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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-10-16 15:31:09 +0400
committerTon Roosendaal <ton@blender.org>2006-10-16 15:31:09 +0400
commit239b08b8b244da1acc770de9853b8e67cd6250ac (patch)
tree4329ee358495f18d094503eaf4682b5c54d6fe82 /source
parent980608af53820f0113af056c0836a34ef35c71b7 (diff)
Bugfix #5090
Duplicating a Library-linked Mesh with Library-linked texture Images forgot to set the texture Image link flag to LIB_EXTERN (LIB_INDIRECT means the ID is not saved in file). Error was that a the duplicated Mesh lost texture.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/mesh.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index d43e79c7d5d..b1b3d87dbcc 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -245,7 +245,13 @@ Mesh *copy_mesh(Mesh *me)
men->dvert = MEM_mallocN (sizeof (MDeformVert)*me->totvert, "MDeformVert");
copy_dverts(men->dvert, me->dvert, me->totvert);
}
-
+ if (me->tface){
+ /* ensure indirect linked data becomes lib-extern */
+ TFace *tface= me->tface;
+ for(a=0; a<me->totface; a++, tface++)
+ if(tface->tpage)
+ id_lib_extern(tface->tpage);
+ }
men->mcol= MEM_dupallocN(me->mcol);
men->msticky= MEM_dupallocN(me->msticky);