Blender Git Loki

Git Commits -> Revision bbac76e

Revision bbac76e by Lukas Toenne (master)
March 19, 2013, 13:40 (GMT)
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.

Commit Details:

Full Hash: bbac76ee2669481132f69fee45b9086a5bd4c695
SVN Revision: 55416
Parent Commit: c9d981c
Lines Changed: +159, -81

11 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+4, -1) (Diff)
/source/blender/blenkernel/intern/node.c (+69, -23) (Diff)
/source/blender/editors/screen/screen_ops.c (+1, -1) (Diff)
/source/blender/editors/space_buttons/buttons_texture.c (+3, -3) (Diff)
/source/blender/editors/space_node/drawnode.c (+49, -0) (Diff)
/source/blender/editors/space_node/node_buttons.c (+2, -2) (Diff)
/source/blender/editors/space_node/node_draw.c (+6, -4) (Diff)
/source/blender/editors/space_node/node_templates.c (+1, -1) (Diff)
/source/blender/editors/space_node/space_node.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+23, -43) (Diff)
/source/blender/nodes/intern/node_exec.c (+0, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021