forked from bartvdbraak/blender
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.
This commit is contained in:
parent
980608af53
commit
239b08b8b2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user