Blender Git Commit Log

Git Commits -> Revision 47aca2b

Revision 47aca2b by Wannes Malfait (master)
April 30, 2021, 04:36 (GMT)
Nodes: Add a callback to check for valid socket type

This adds a callback to bNodeTreeType to check which socket types are
valid for the tree type. Function has been implemented for the normal
tree types, and can be implemented for custom node trees with python,
by adding a `classmethod` to the tree. However, only builtin socket
types are supported.

This is relevant for T87049, but it also has the advantage that it is
now clear which node trees support which sockets. Previously this
was assumed to be known by all developers.

Differential Revision: https://developer.blender.org/D10938

Commit Details:

Full Hash: 47aca2b4c402ec35ea52c18afcc0840bcf283b26
Parent Commit: ddaeaa4
Committed By: Hans Goudey
Lines Changed: +76, -1

6 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+36, -1) (Diff)
/source/blender/nodes/composite/node_composite_tree.c (+7, -0) (Diff)
/source/blender/nodes/geometry/node_geometry_tree.cc (+16, -0) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+7, -0) (Diff)
/source/blender/nodes/texture/node_texture_tree.c (+7, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021