From bbac76ee2669481132f69fee45b9086a5bd4c695 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Tue, 19 Mar 2013 13:40:16 +0000 Subject: Nicer handling of undefined node, tree and socket types. When nodes are loaded from a .blend file they can potentially have undefined types. This can happen if a type has been deprecated and removed, or if node types were defined in a python script that has not been loaded correctly. Previously all such nodes would automatically be removed from a node tree, assuming that their types were deprecated and no longer in use (more commonly caused by loading new nodes in an older Blender version). Due to the possibility of dynamic registration it is no longer feasible to simply delete such nodes. Display and handling of node trees was simply disabled before this patch, so that a node tree where any node or socket type was undefined would not be displayed at all. To give more information and avoid problems caused by necessary checks for the typeinfo pointer, there is now a 'Undefined' fallback type for trees, nodes and sockets. These types are used as placeholders in case the real type is not registered and can provide useful visual feedback on undefined nodes. --- source/blender/nodes/intern/node_exec.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/nodes/intern/node_exec.c') diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c index e5528b0dbc8..62a937b106c 100644 --- a/source/blender/nodes/intern/node_exec.c +++ b/source/blender/nodes/intern/node_exec.c @@ -156,8 +156,6 @@ bNodeTreeExec *ntree_exec_begin(bNodeExecContext *context, bNodeTree *ntree, bNo bNode **nodelist; int totnodes, n; - BLI_assert(ntreeIsValid(ntree)); - /* ensure all sock->link pointers and node levels are correct */ ntreeUpdateTree(ntree); -- cgit v1.2.3