Page MenuHome

Generalization of the categories menu so it can be used in the Add menu as well as the material properties tree view.
Needs ReviewPublic

Authored by Lukas Tönne (lukastoenne) on Apr 15 2014, 5:23 PM.

Details

Summary
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.

Diff Detail

Branch
node_treeview_categories

Event Timeline