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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user