From 4a04f7206914a49f5f95adc5eb786237f1a9f547 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 23 Oct 2011 17:52:20 +0000 Subject: remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n --- source/blender/blenkernel/intern/mesh.c | 57 +++++++++++---------------------- 1 file changed, 18 insertions(+), 39 deletions(-) (limited to 'source/blender/blenkernel/intern/mesh.c') diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 9574c886ccc..a5bf39d895c 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -243,39 +241,26 @@ Mesh *copy_mesh(Mesh *me) return men; } -static void make_local_tface(Main *bmain, Mesh *me) +static void expand_local_mesh(Mesh *me) { - MTFace *tface; - Image *ima; - int a, i; - - for(i=0; ifdata.totlayer; i++) { - if(me->fdata.layers[i].type == CD_MTFACE) { - tface= (MTFace*)me->fdata.layers[i].data; - - for(a=0; atotface; a++, tface++) { - /* special case: ima always local immediately */ - if(tface->tpage) { - ima= tface->tpage; - if(ima->id.lib) { - ima->id.lib= NULL; - ima->id.flag= LIB_LOCAL; - new_id(&bmain->image, (ID *)ima, NULL); + id_lib_extern((ID *)me->texcomesh); + + if(me->mtface) { + MTFace *tface; + int a, i; + + for(i=0; ifdata.totlayer; i++) { + if(me->fdata.layers[i].type == CD_MTFACE) { + tface= (MTFace*)me->fdata.layers[i].data; + + for(a=0; atotface; a++, tface++) { + if(tface->tpage) { + id_lib_extern((ID *)tface->tpage); } } } } } -} - -static void expand_local_mesh(Main *bmain, Mesh *me) -{ - id_lib_extern((ID *)me->texcomesh); - - if(me->mtface) { - /* why is this an exception? - should not really make local when extern'ing - campbell */ - make_local_tface(bmain, me); - } if(me->mat) { extern_local_matarar(me->mat, me->totcol); @@ -295,11 +280,8 @@ void make_local_mesh(Mesh *me) if(me->id.lib==NULL) return; if(me->id.us==1) { - me->id.lib= NULL; - me->id.flag= LIB_LOCAL; - - new_id(&bmain->mesh, (ID *)me, NULL); - expand_local_mesh(bmain, me); + id_clear_lib_data(&bmain->mesh, (ID *)me); + expand_local_mesh(me); return; } @@ -311,11 +293,8 @@ void make_local_mesh(Mesh *me) } if(local && lib==0) { - me->id.lib= NULL; - me->id.flag= LIB_LOCAL; - - new_id(&bmain->mesh, (ID *)me, NULL); - expand_local_mesh(bmain, me); + id_clear_lib_data(&bmain->mesh, (ID *)me); + expand_local_mesh(me); } else if(local && lib) { Mesh *men= copy_mesh(me); -- cgit v1.2.3