"Make Local" option "Objects and Data" made materials get
lost on save, the tagging was incorrect. Now it makes 
Materials local too.

Implementation note: the code is new (not 2.4) so it misses
some of the hairy goodies we had. It's something for another
time to really make this reliably work.
This commit is contained in:
2010-12-20 18:54:32 +00:00
parent 8017a9513b
commit d0193b938d

View File

@@ -1727,6 +1727,16 @@ static int make_local_exec(bContext *C, wmOperator *op)
id_make_local(id, 0);
adt= BKE_animdata_from_id(id);
if(adt) BKE_animdata_make_local(adt);
/* tag indirect data direct */
matarar= (Material ***)give_matarar(ob);
if(matarar) {
for(a=0; a<ob->totcol; a++) {
ma= (*matarar)[a];
if(ma)
id_lib_extern(&ma->id);
}
}
}
for(psys=ob->particlesystem.first; psys; psys=psys->next)