Correct recent own fix to id_clear_lib_data_ex().

Datablocks' nodetree are *never* in main, while shapekeys are...
This commit is contained in:
Bastien Montagne
2016-07-14 18:16:05 +02:00
parent e7d4d661f3
commit bcfd8d9ab8
2 changed files with 3 additions and 3 deletions

View File

@@ -1483,12 +1483,12 @@ void id_clear_lib_data_ex(Main *bmain, ID *id, bool id_in_mainlist)
/* Internal bNodeTree blocks inside datablocks also stores id->lib, make sure this stays in sync. */
if ((ntree = ntreeFromID(id))) {
id_clear_lib_data_ex(bmain, &ntree->id, id_in_mainlist);
id_clear_lib_data_ex(bmain, &ntree->id, false); /* Datablocks' nodetree is never in Main. */
}
/* Same goes for shapekeys. */
if ((key = BKE_key_from_id(id))) {
id_clear_lib_data_ex(bmain, &key->id, id_in_mainlist);
id_clear_lib_data_ex(bmain, &key->id, id_in_mainlist); /* sigh, why are keys in Main? */
}
if (GS(id->name) == ID_OB) {

View File

@@ -2713,7 +2713,7 @@ static void lib_link_node_socket(FileData *fd, ID *UNUSED(id), bNodeSocket *sock
IDP_LibLinkProperty(sock->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd);
}
/* singe node tree (also used for material/scene trees), ntree is not NULL */
/* Single node tree (also used for material/scene trees), ntree is not NULL */
static void lib_link_ntree(FileData *fd, ID *id, bNodeTree *ntree)
{
bNode *node;