Commit: 5e92a0faad987a84d4a1c1a9d7459c2847865577
Author: Bastien Montagne
Date:   Mon Oct 17 14:49:35 2016 +0200
Branches: master
https://developer.blender.org/rB5e92a0faad987a84d4a1c1a9d7459c2847865577

Fix T49722: Appending Bug (Groups).

One day we'll have to reconsider why some many 'real' ID usages are not
refcounting... :(

To be backported to 2.78a.

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

M       source/blender/blenkernel/intern/library.c

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

diff --git a/source/blender/blenkernel/intern/library.c 
b/source/blender/blenkernel/intern/library.c
index a2802d2..93bf5e1 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -1746,6 +1746,11 @@ void BKE_library_make_local(Main *bmain, const Library 
*lib, const bool untagged
                                                        ob->proxy = 
ob->proxy_from = ob->proxy_group = NULL;
                                                }
                                        }
+                                       /* Special hack for groups... Thing is, 
since we can't instantiate them here, we need to ensure
+                                        * they remain 'alive' (only 
instantiation is a real group 'user'... *sigh* See T49722. */
+                                       else if (GS(id->name) == ID_GR && 
(id->tag & LIB_TAG_INDIRECT) != 0) {
+                                               id_us_ensure_real(id->newid);
+                                       }
 
                                        BKE_library_ID_test_usages(bmain, id, 
&is_local, &is_lib);
                                        if (!is_local && !is_lib) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to