Expose node socket actual value (not default_value) to the Python API
Currently, there is no way to access a node socket's actual value using python. There is a default_value property for all sockets with a property display field, but that is still not the actual value of the socket, and it also means that it wouldn't work for socket types with no default_value (such as NodeSocketGeometry, NodeSocketClosure).
This means that it is impossible to add working custom nodes to an existing blender node tree type, and it means that only custom sockets will work with a custom node tree.
One thing that would fix this is if all the built-in socket types were given a new property for their actual value, or if it were made part of the bpy.types.Node class, or if the node tree itself had methods to use sockets on custom nodes.
Apart from these features being added, the only other way to do it is to use the depsgraph, and that will only work for shader node trees and geometry node trees because they are related to objects and the get evaluated depsgraph function can be used with objects.
Another thing that this feature would allow would be using built-in socket types with no default_value in custom node trees without having to implement custom logic in the nodes to make it work.
0 Comments