Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-11-19 16:23:48 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-11-19 17:55:05 +0300
commit42b2ae5f694d554b1f4c58acd0afd26516b9ed20 (patch)
tree8ecbae259cdc8f5801139f522f66e4e077069035 /source/blender/blenkernel/intern/node.c
parentc5306dd0cdf1f320f7b498d7b914d9374a7aa90f (diff)
Fix lost node links when linked node group datablock is temporarily missing
Don't refresh the list of sockets, so that when the .blend file is restored the links remain valid. Also display such nodes in red to indicate an error, same as when the node type info is missing.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r--source/blender/blenkernel/intern/node.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index e2e61284d2e..180cced70ea 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1204,9 +1204,11 @@ void nodeUnregisterType(bNodeType *nt)
BLI_ghash_remove(nodetypes_hash, nt->idname, NULL, node_free_type);
}
-bool nodeIsRegistered(bNode *node)
+bool nodeTypeUndefined(bNode *node)
{
- return (node->typeinfo != &NodeTypeUndefined);
+ return (node->typeinfo == &NodeTypeUndefined) ||
+ (node->type == NODE_GROUP && node->id && ID_IS_LINKED(node->id) &&
+ (node->id->tag & LIB_TAG_MISSING));
}
GHashIterator *nodeTypeGetIterator(void)