Since a year and a half ago, we've been switching to a new way
to represent what sockets a node should have called "declarations"
that's easier to use, clearer, and more flexible for upcoming features
like dynamic socket counts or generic type sockets.
All builtin nodes with a static set of sockets have switched, but one
missing area has been group nodes and group input/output nodes.
These nodes have dynamic declarations which change based on
their properties or the group they're inside of. This patch addresses that,
in preparation for using the same dynamic declaration feature for
simulation nodes.
Generally there shouldn't be user-visible differences, but one benefit
is that user-created socket descriptions are now visible directly in the
node editor for group nodes and group input/output nodes.
The patch contains a few changes:
- Add a node type callback for building dynamic declarations with different arguments
- Add an Extend socket declaration for the "virtual" sockets used for connecting new links
- A similar Custom socket declaration is used for addon-defined socket
- Simplify the node update loop to use the declaration to build update sockets
- Replace the "group update" functions with the declaration building
- Move the node group input/output link creation to link drag operator
- Make the field status part of group node declarations (not for group input/output nodes though)
- Some fixes for socket declarations to make them update and build properly
I did a bit of refactoring in master to make this possible (and may do more if other problems come up):
