NOTE: This is work in progress, some parts are unfinished ...
The NodeLink template used for the shader nodes currently uses its own
method of listing nodes. To unify this with the standard node categories
system in the 'Add' menu, a couple of new operators have been added in
python.
These operators work with context arguments 'link_node'/'link_socket'
which specify a node socket that should be replaced.
There are a couple of features that are not easily generalizable:
- To determine nodes which are suitable for replacing an existing node
there are a couple of python methods (input/output_link_items,
is_link_compatible) in bpy_types. These should become RNA methods
eventually.
- Copying parameters from one node to another is not implemented yet.
The C code uses fairly specialized code for this. It would be good to
have a general mechanism for this, not just a custom python function.
- The UI for the C template is also quite specialized and probably not
reproducable down to the last detail.