Fix bad handling of datablock's nodetree id_clear_lib_data_ex().
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 14 Jul 2016 13:23:53 +0000 (15:23 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 14 Jul 2016 16:33:12 +0000 (18:33 +0200)
Those data blocks are never shared, exactly as with shapekeys, much simpler
to also clear their lib_data (especially since they have no user!).

source/blender/blenkernel/intern/library.c

index c2390085ad2d7b0b0da75a774176d71fc7956929..f570066ed16d272c371fc1b821f98a8e6498f856 100644 (file)
@@ -1483,10 +1483,8 @@ void id_clear_lib_data_ex(Main *bmain, ID *id, bool id_in_mainlist)
        /* internal bNodeTree blocks inside ID types below
         * also stores id->lib, make sure this stays in sync.
         */
-       ntree = ntreeFromID(id);
-
-       if (ntree) {
-               ntreeMakeLocal(bmain, ntree, false, false);
+       if ((ntree = ntreeFromID(id))) {
+               id_clear_lib_data_ex(bmain, &ntree->id, id_in_mainlist);
        }
 
        if (GS(id->name) == ID_OB) {