Blender Git Loki

Git Commits -> Revision 62acb8b

July 3, 2021, 16:29 (GMT)
Changed socket validation to work on full types.

The socket validation function in `bNodeTreeType` now works on the
`bNodeSocketType` rather than just the (legacy) integer base type.
This allows custom node trees (python nodes) to check for their own
socket types, which could not otherwise be distinguished (all custom
socket types map to the SOCK_CUSTOM base type).

The registerable RNA method `valid_socket_type` of node trees remains
unchanged to avoid breaking the API. There is now an alternative
`valid_socket_type_full` method which takes the idname instead of the
old integer enum. If `valid_socket_type_full` is defined then
`valid_socket_type` is ignored.

The socket_change_type operator now uses idnames as well, filtering out
all types that are unsupported by the tree as well as subtype
specializations.

Commit Details:

Full Hash: 62acb8bf8755be1775d2dc35e446b28971a47b51
Parent Commit: c700475
Lines Changed: +299, -76

1 Added Path:

/release/scripts/templates_py/custom_nodetree_valid_sockets.py (+187, -0) (View)

10 Modified Paths:

/source/blender/blenkernel/BKE_node.h (+6, -4) (Diff)
/source/blender/blenkernel/intern/node.cc (+1, -1) (Diff)
/source/blender/editors/space_node/node_buttons.c (+4, -2) (Diff)
/source/blender/editors/space_node/node_edit.cc (+21, -30) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+68, -26) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+0, -1) (Diff)
/source/blender/nodes/composite/node_composite_tree.c (+3, -3) (Diff)
/source/blender/nodes/geometry/node_geometry_tree.cc (+3, -3) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+3, -3) (Diff)
/source/blender/nodes/texture/node_texture_tree.c (+3, -3) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021