[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33819] trunk/blender/source/blender/ editors/object/object_relations.c: Bugfix #25312

Ton Roosendaal ton at blender.org
Mon Dec 20 19:54:32 CET 2010


Revision: 33819
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33819
Author:   ton
Date:     2010-12-20 19:54:32 +0100 (Mon, 20 Dec 2010)

Log Message:
-----------
Bugfix #25312

"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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/object/object_relations.c

Modified: trunk/blender/source/blender/editors/object/object_relations.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_relations.c	2010-12-20 18:29:32 UTC (rev 33818)
+++ trunk/blender/source/blender/editors/object/object_relations.c	2010-12-20 18:54:32 UTC (rev 33819)
@@ -1727,6 +1727,16 @@
 			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)





More information about the Bf-blender-cvs mailing list