Fix assert after recent changes.

Mark as localized immediately, so that functions that edit the node tree can
verify they are being used under the correct conditions.
This commit is contained in:
Brecht Van Lommel
2019-03-20 18:17:24 +01:00
parent b6d1946c2e
commit eb94a0db4f

View File

@@ -2045,6 +2045,8 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
(LIB_ID_COPY_LOCALIZE |
LIB_ID_COPY_NO_ANIMDATA));
ltree->id.tag |= LIB_TAG_LOCALIZED;
for (node = ltree->nodes.first; node; node = node->next) {
if ((ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) && node->id) {
node->id = (ID *)ntreeLocalize((bNodeTree *)node->id);
@@ -2062,8 +2064,6 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
if (ntree->typeinfo->localize)
ntree->typeinfo->localize(ltree, ntree);
ltree->id.tag |= LIB_TAG_LOCALIZED;
BLI_mutex_unlock(ntree->duplilock);
return ltree;