节点组¶
节点编组可以通过允许实例化和隐藏部分树来简化节点树。
从概念上讲,对节点分组允许您指定一 组 节点,您可以将它们视为“仅仅是一个节点”。节点组与编程中的函数相似,它们可以在节点树中的许多位置重用,并且可以通过更改节点组的“参数”进行自定义。
举个例子:如果你创建一个你希望能够用于不同输入的材质,例如漫反射颜色:红色塑料,绿色塑料。你可以使用 制作单一用户,使用描述塑料材质的树部分的副本为每种不同颜色创建不同的材质。如果你想编辑材质,则需要重新编辑所有材质。更好的重用方法是创建节点组,只显示变量输入(例如漫反射颜色)。
也支持嵌套节点组。即节点组可以插入或创建在另一个节点组内。
Note
所有当前节点系统都禁止递归节点组以防止无限递归。即节点组永远不能包含自己(或包含它的另一个组)。
界面¶
When a node group is created, new Group Input and Group Output nodes are generated to represent the data flow into and out of the group. Furthermore connections to input sockets coming from unselected nodes will become attached to new sockets on the Group Input node. Similarly, outgoing connections to input sockets of unselected nodes will become attached to the new Group Output node.
If you want to pass an additional parameter into the group, an socket must be added to the Group Input node. Therefore drag a connection from the hollow socket on the right side of the Group Input node to the desired input socket on the node requiring an input. The process is similar for the Group Output regarding data you want to be made available outside the group.
面板¶
参考
- 模式
所有模式
- 面板
可以添加,重新排序或删除接口,可以添加描述性名称以及此处定义的输入数据值的详细信息。
If you have multiple inputs or outputs, they can be re-ordered by selecting the socket in the list. and then moving them up or down with the arrow buttons on the right side of the panel. The plus button will add an unconnected socket of the same type as the selected socket or a value socket if there is no selection. The minus button will remove the selected socket. The triangle at the bottom of the list has filtering functions to help finding nodes if the group has a large number of sockets.
- Name
The name of the socket to display in the node's interface.
- Default
The value to use when nothing is connected to the node socket. Note, this will not affect the current node but will affect instances of the node.
- Min, Max
The minimum and maximum value for the UI button shown in the node interface. Note, this is not a minimum or maximum for the data that can pass through the node. If a socket passes a higher value than the maximum it will still pass into the node unchanged.
- Hide Value
Hide the socket value even when the socket is not connected.
编辑组¶
参考
- 模式
所有模式
- 菜单
- 标题栏
- 快捷键
Tab, Ctrl-Tab
选中节点组后, Tab 用于展开节点组,将一一显示其包含的单个节点。用户可以任意移动,单独操作独立节点的控制部分,重新组织节点等等。就像它们是正常编辑视图的其中一部分。虽然用户不能将内部的节点直接连到群组外;用户可以使用群组节点外部边缘的连接端口。 Tab 键可以进入或者是退出群组节点, Ctrl-Tab 只能用于退出。
建立组¶
参考
- 模式
所有模式
- 菜单
- 快捷键
Ctrl-G
To create a node group, select the nodes you want to include, then press Ctrl-G,
. A node group will have a green title bar. All selected nodes will now be contained within the node group. Default naming for the node group is "NodeGroup", "NodeGroup.001" etc. There is a name field in the node group you can click into to change the name of the group. Change the name of the node group to something meaningful. When appending node groups from one blend-file to another, Blender does not make a distinction between material node groups or composite node groups. So it is recommended to use some naming convention that will allow you to distinguish between the two types.Tip
什么 不 包括在你的组中(所有节点编辑器模式)
Remember that the essential idea is that a group should be an reusable, self-contained software component. Material node groups should not include:
- 输入节点
如果群组中包含源节点,则最终会让源节点显示 两次:一次在组内,一次在新材质节点网络中出现在群组之外。
- 输出节点
如果在组中包含输出节点,则不会有可 用于 群组的输出接口!
解散组¶
参考
- 模式
所有模式
- 菜单
- 快捷键
Ctrl-Alt-G
The Ctrl-Alt-G tool removes the group and places the individual nodes into your editor workspace. No internal connections are lost, and now you can link internal nodes to other nodes in your workspace.
- 单独 P
从节点组从单独选择节点。
- 复制
复制到父节点树,保持组完好无损。
- 移动
从组中移动到父节点树。
插入到组¶
参考
- 模式
所有模式
- 菜单
选择一组节点,最后选择目标组节点,然后按
将这些节点移动到该组中。移动的节点被收集到它们自己的一组中以保持它们的连接,并具有它们自己的组输入和输出节点。该组的现有输入和输出节点将使用新节点的新接口(如果有)进行更新。必须对节点组进行编辑以包含一个 组输入 和一个 组输出 节点。追加节点组¶
参考
- 编辑器
顶栏
- 模式
所有模式
- 菜单
将节点树添加到blend文件后,你可以通过按下 Shift-A,
, 在节点编辑器中使用它,然后选择追加组。本群组的“控制面板”包括分组节点的单独控制。你可以像使用其他任何节点一样使用组节点来更改它们。