Группы узлов#

../../../_images/interface_controls_nodes_groups_example.png

Пример узла группы.#

Grouping nodes can simplify a node tree by hiding away complexity and reusing repetitive parts.

Conceptually, node groups allow you to treat a set of nodes as though it were just one node. They’re similar to functions in programming: they can be reused (even in different node trees) and can be customized by changing their «parameters.»

As an example, say you created a «Wood» material that you would like to have in different colors. One way of doing this would be to duplicate the entire material for every color, but if you did that, you’d have to go over all those copies again if you later wanted to change the density of the grain lines. Instead, it would be better to move the nodes that define the wood look into a node group. Each material can then reuse this node group and just supply it with a color. If you then later want to change the grain line density, you only have to do it once inside the node group, rather than for every material.

Node groups can be nested (that is, node groups can contain other node groups).

Примечание

Рекурсивные группы узлов запрещены для всех текущих узловых систем, чтобы предотвратить бесконечную рекурсию. Группа узлов никогда не может содержать себя (или другую группу, которая её содержит).

Совет

Like all data-blocks, node groups with names that start with . are normally hidden from lists and menus and can only be accessed through search. This can be useful for node asset authors to hide their internal sub-groups from the final user.

Интерфейс#

Когда создаётся группа узлов, создаются новые узлы Group Input и Group Output для представления потока данных, входящего в группу и исходящего из неё. Кроме того, подключения к портам входа, исходящие от невыбранных узлов, будут присоединены к новым портам на узле Group Input. Точно так же исходящие подключения к портам входа невыбранных узлов будут привязаны к новому узлу Group Output.

If you want to pass an additional parameter into the group, a socket must be added to the Group Input node. To do this, 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.

Создание группы#

Справка

Меню:

Node ‣ Make Group

Горячая клавиша:

Ctrl-G

To create a node group, select the nodes you want to include, then press Ctrl-G or click Group ‣ Make Group. 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.

При добавлении групп узлов из одного blend-файла в другой, Blender не делает различий между группами узлов материалов и составными (composite) группами узлов. Поэтому рекомендуется использовать некоторое соглашение об именах, которое позволит вам различать эти два типа.

Совет

The «Add» menu of each node editor contains an «Output» category with node types such as «Material Output.» These node types should not be confused with the «Group Output» node found in node groups, and should not be used in node groups either (only in the top-level node tree).

Insert Into Group#

Справка

Меню:

Node ‣ Insert Into Group

Moves the selected nodes into the active group node. To use, select a set of nodes, ending with the destination group node, then, running the operation 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.

Редактирование группы#

Справка

Меню:

Node ‣ Edit Group

Главная панель редактора:

Go to Parent Node Tree

Горячая клавиша:

Tab, Ctrl-Tab

With a node group selected, press Tab to move into it and see its content. Press Tab again (or Ctrl-Tab) to leave the group and go back to its parent, which could be the top-level node tree or another node group. You can refer to the breadcrumbs in the top left corner of the node editor to see where you are in the hierarchy.

../../../_images/render_cycles_optimizations_reducing-noise_glass-group.png

Пример раскрытой группы узлов.#

Разгруппировка#

Справка

Меню:

Node ‣ Ungroup

Горячая клавиша:

Ctrl-Alt-G

Удаляет группу и помещает отдельные узлы в рабочую область вашего редактора. Внутренние соединения не теряются, и теперь вы можете связать внутренние узлы с другими узлами в вашей рабочей области.

Separate (отделение) P

Отделение выбранных узлов от группы узлов.

Copy

Копирование в родительское дерево узлов, оставляя группу без изменений.

Move (перемещение)

Перемещение в родительское дерево узлов, удаление из группы.

Reusing Node Groups#

Справка

Меню:

Add ‣ Group

Горячая клавиша:

Shift-A

Existing node groups can be placed again after they’re initially defined, be it in the same node tree or a different one. It’s also possible to import node groups from a different blend-file using File ‣ Link/Append.