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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2010-12-20 21:54:32 +0300
committerTon Roosendaal <ton@blender.org>2010-12-20 21:54:32 +0300
commitd0193b938d07b0c70f4bbbae0f9fd2d195141da3 (patch)
treeb002f44308e0ae75d3bd67870f48a6def49498a4 /source/blender/editors/object
parent8017a9513be58454b10c324bc729d53880e3f9b5 (diff)
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.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_relations.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 47eafd2b6bb..93b5ff667f9 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -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)