Commit: 439437fa3a446cfb219d94debb75d73d756ce09f
Author: Bastien Montagne
Date:   Sun Feb 10 14:36:19 2019 +0100
Branches: master
https://developer.blender.org/rB439437fa3a446cfb219d94debb75d73d756ce09f

Fix T61141: Append Particle Settings doesn't append the collection properly.

ParticleSettings' duplicollection is now a proper refcounting user of
its collection, which will avoid losing it on save/reload.

===================================================================

M       source/blender/blenkernel/intern/library_query.c
M       source/blender/blenloader/intern/readfile.c

===================================================================

diff --git a/source/blender/blenkernel/intern/library_query.c 
b/source/blender/blenkernel/intern/library_query.c
index 7f743e7d61f..cfda7ab2682 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -812,7 +812,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, 
LibraryIDLinkCallback call
                        case ID_PA:
                        {
                                ParticleSettings *psett = (ParticleSettings *) 
id;
-                               CALLBACK_INVOKE(psett->dup_group, 
IDWALK_CB_NOP);
+                               CALLBACK_INVOKE(psett->dup_group, 
IDWALK_CB_USER);
                                CALLBACK_INVOKE(psett->dup_ob, IDWALK_CB_NOP);
                                CALLBACK_INVOKE(psett->bb_ob, IDWALK_CB_NOP);
                                CALLBACK_INVOKE(psett->collision_group, 
IDWALK_CB_NOP);
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index da5d87d4494..1f112f41526 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4264,7 +4264,7 @@ static void lib_link_particlesettings(FileData *fd, Main 
*main)
                        part->ipo = newlibadr_us(fd, part->id.lib, part->ipo); 
// XXX deprecated - old animation system
 
                        part->dup_ob = newlibadr(fd, part->id.lib, 
part->dup_ob);
-                       part->dup_group = newlibadr(fd, part->id.lib, 
part->dup_group);
+                       part->dup_group = newlibadr_us(fd, part->id.lib, 
part->dup_group);
                        part->eff_group = newlibadr(fd, part->id.lib, 
part->eff_group);
                        part->bb_ob = newlibadr(fd, part->id.lib, part->bb_ob);
                        part->collision_group = newlibadr(fd, part->id.lib, 
part->collision_group);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to