利用者:Phonybone/NodeTreeInterface/UserDoc
Outdated
This is the first version of the interface proxy nodes. It does not yet include other editor changes, such as arbitrary groups inside groups, editor paths and pinning
|
Group Nodes
Group nodes are special nodes that are linked to a different node tree. Each group node shares this node tree with all other group nodes linking to the same tree.
The functionality of that tree can be modified without having it to copy the nodes afterwards, all group nodes will use the updated nodes in the shared tree automatically. Furthermore the group node tree can be linked from external files like other ID data blocks, making it possible to reuse it in different .blend files.
Making a node group
There are different ways of creating a node group.
- Add an empty group node ⇧ ShiftA » Add » Group » New Group
- A new node tree without nodes is created and a group node linking to it is inserted.
- Create a node tree from selected nodes CtrlG
- All currently selected nodes are removed and put into a new node tree. A group node linking to that tree is then inserted in their place. All external links to and from selected nodes are redirected to the group instead.
Interfaces
In order to control the behavior of the group node tree and to use the results generated by internal nodes, the node tree can define a custom interface. In the case of group nodes this interface is displayed as a number of inputs and outputs one the node.
For regular, non-group trees the interface could be displayed as a set of button controls in a separate panel. This way of displaying node tree interfaces is not implemented yet.
Proxy Nodes
Internally the node tree interface is represented by proxy nodes. There is an input proxy and an output proxy node type for the respective kind of socket in the interface. For each proxy node in the node tree one corresponding input/output socket or button is generated.
Proxy nodes have a number of options that allow the user to define the details of the interface.
- Name
- Data type (currently one of number, color, vector or shader, depending on the node tree type)
Output proxy nodes also support Auto selection to automatically adopt the type of the connected socket. - Data subtype, for more detailed input information and units
- Min/Max limits for custom value range
Proxy nodes can be created by dragging an existing node socket into an empty area while pressing ⇧ Shift. This will create a new proxy node with the same name and type settings as the exposed node and connect them. Proxy nodes can also be added from the ⇧ ShiftA » Add » Input/Output menus, but the user has to setup the type information manually then.
Interface Lists
To control the order of group node sockets or buttons in the external interface the node tree displays a list of input and output proxies on the left and right side. If a proxy node is active the corresponding item in the list is also highlighted. This works both ways, clicking a list item activates the proxy node.
The order of items in the input/output lists can be changed selecting an item and then clicking the up/down arrow buttons above the list.