节点组¶
![../../_images/interface_controls_nodes_groups_example.png](../../_images/interface_controls_nodes_groups_example.png)
节点组示例。¶
将节点进行编组,可以通过允许实例化和隐藏部分节点树来简化节点树。材质节点和复合节点都可以进行分组。
Conceptually, grouping nodes allows you to specify a set of nodes that you can treat as though it were "just one node". Node groups are similar to functions in programming, they can be reused in many places in a node tree and can be customized by changing the "parameters" of the node group.
例如:如果你创建了一个想要使用不同输入的材质(例如:漫反射颜色,红色塑料和绿色塑料)。你可以对不同材质进行单独处理。但如果你想编辑材质属性,则需要重新编辑所有材质。而使用节点组,仅需要改变变量输入即可(例如,漫反射颜色)。
节点组还支持嵌套。也就是说可以在一个节点组中插入或创建另一个节点组。
Note
所有节点系统都禁止递归节点组以防止无限递归。节点组永远不能包含自身。
制作节点组¶
参考
- 模式
全部模式
- 菜单
- 快捷键
Ctrl-G
创建节点组的方法如下:选择要包含的节点,然后按 Ctrl-G,
。节点组将具有绿色标题栏。而所有选定的节点都将包含在该节点组中。节点组的默认名称为 "NodeGroup", "NodeGroup.001" 等。节点组的名称可以通过点击进行更改。尽量将节点组的名称更改为有意义的名称。将节点组从一个blender文件附加到另一个blender文件时,blender不会区分材质节点组或复合节点组,因此建议使用一些命名约定,以便可以轻松区分这两种类型。Tip
不能 用于节点组的节点:
时刻记着,节点组的基本思想是:组应该是一个易于重复利用,自我包含的软件组件。材质节点组 不能 含有:
- 输入节点
如果在组中包含源节点,则最终会使源节点出现 两次 :一次出现在组内,一次出现在新材质节点网络中的组外。
- 输出节点
如果在组中包含输出节点,那么,该组就 不会 有输出接口!
编辑节点组¶
参考
- 模式
全部模式
- 菜单
- 标题栏
- 快捷键
Tab, Ctrl-Tab
选中节点组后, Tab 用于展开节点组,将一一显示其包含的单个节点。用户可以任意移动,单独操作独立节点的控制部分,重新组织节点等等。就像它们是正常编辑视图的其中一部分。虽然用户不能将内部的节点直接连到群组外;用户可以使用群组节点外部边缘的连接端口。 Tab 键可以进入或者是退出群组节点, Ctrl-Tab 只能用于退出。
![../../_images/render_cycles_optimizations_reducing-noise_glass-group.png](../../_images/render_cycles_optimizations_reducing-noise_glass-group.png)
展开后的节点组示例。¶
取消编组¶
参考
- 模式
全部模式
- 菜单
- 快捷键
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 thread internal nodes to other nodes in your workspace.
- 分离 P
将所选节点与节点组分开。
- 复制
复制到父级节点树,并保持节点组完好。
- 移动
从组中删除,移动至父级节点树。
插入节点组¶
参考
- 模式
全部模式
- 菜单
Selecting a set of nodes, ending with the destination group node, and pressing
will move those nodes into that group. The moved nodes are collected into a group of their own to preserve their connection context, having their own group input and output nodes. The group's existing input and output nodes are updated with new sockets, if any, from the new nodes. The node group must be edited to contain a single Group Input and a single Group Output node.添加节点组¶
参考
- 编辑器
顶部工具栏
- 模式
全部模式
- 菜单
将节点树添加到blender文件后,可以通过按 Shift-A,
来选择附加组,并在节点编辑器中使用它。该组的 "控制面板" 包括各个分组的节点控件。你可以像处理任何其他节点一样使用组节点来更改它们。