Blender Git Loki

Git Commits -> Revision cc835be

May 1, 2021, 08:12 (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: cc835bec8abddfe020a1627bc21409d898656308
Parent Commit: ffcb99e
Committed By: YimingWu
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021