diff --git a/manual/images/node-types_GeometryNodeMenuSwitch.webp b/manual/images/node-types_GeometryNodeMenuSwitch.webp new file mode 100644 index 000000000..1bb2875e6 --- /dev/null +++ b/manual/images/node-types_GeometryNodeMenuSwitch.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b47d75b66898d21b62a1470fda0fba2ba8006815382c7b8abd31721168a93cf +size 9370 diff --git a/manual/images/node-types_GeometryNodeMenuSwitch_conflict.webp b/manual/images/node-types_GeometryNodeMenuSwitch_conflict.webp new file mode 100644 index 000000000..fab8dcf1f --- /dev/null +++ b/manual/images/node-types_GeometryNodeMenuSwitch_conflict.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5f03f825e59ab0637b55f6cbbdab7446169622af8523f19a99780a559e0ebf2 +size 25059 diff --git a/manual/images/node-types_GeometryNodeMenuSwitch_group_wrapper.webp b/manual/images/node-types_GeometryNodeMenuSwitch_group_wrapper.webp new file mode 100644 index 000000000..09511a61c --- /dev/null +++ b/manual/images/node-types_GeometryNodeMenuSwitch_group_wrapper.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5153914f9e827f7066c654589c5eff21613e6edd75d41e206597aa1850c4c197 +size 26119 diff --git a/manual/modeling/geometry_nodes/utilities/index.rst b/manual/modeling/geometry_nodes/utilities/index.rst index afea42f75..0b3a80961 100644 --- a/manual/modeling/geometry_nodes/utilities/index.rst +++ b/manual/modeling/geometry_nodes/utilities/index.rst @@ -26,6 +26,7 @@ General purpose nodes for modifying data. .. toctree:: :maxdepth: 1 + menu_switch.rst random_value.rst repeat_zone.rst switch.rst diff --git a/manual/modeling/geometry_nodes/utilities/menu_switch.rst b/manual/modeling/geometry_nodes/utilities/menu_switch.rst new file mode 100644 index 000000000..ce0ffa14a --- /dev/null +++ b/manual/modeling/geometry_nodes/utilities/menu_switch.rst @@ -0,0 +1,61 @@ +.. index:: Geometry Nodes; Menu Switch +.. _bpy.types.GeometryNodeMenuSwitch: + +**************** +Menu Switch Node +**************** + +.. figure:: /images/node-types_GeometryNodeMenuSwitch.webp + :align: right + :alt: Menu Switch Node. + +A *Menu Switch* node outputs one of its inputs depending on a menu +selection. Only the input that is passed through the node is computed. + +The available menu entries are defined by the user. Menu items can be +added and removed, as well as renamed and reordered in the editor side +bar. Renaming a menu entry keeps existing links of the matching input +socket. + +The menu can be used in node groups and the nodes modifier UI. +Connecting the menu input with a *Group Input* node will expose the menu +as a group input. A menu socket in a node group, reroute node, or other +pass-through nodes needs to be connected to a *Menu Switch* node in +order to work. An unconnected menu socket will show an empty menu by +default. + +Connecting multiple *Menu Switch* nodes to the same output +socket creates a conflict (even when the menu entries are the same). +To avoid this a menu switch can be wrapped in a node group. Multiple +node groups of the same type can be connected to the same menu, since +they contain the same menu switch node. + ++-------------------------------------------------------------------+------------------------------------------------------------------------+ +|.. figure:: /images/node-types_GeometryNodeMenuSwitch_conflict.webp|.. figure:: /images/node-types_GeometryNodeMenuSwitch_group_wrapper.webp| +| :align: left | :align: right | +| :alt: Conflict caused by connecting different menus. | :alt: Same node group can be connected without conflict. | ++-------------------------------------------------------------------+------------------------------------------------------------------------+ + +Inputs +====== + +Menu + Determines which of the input options below will be passed through. + +Item Inputs + One input is created for every menu entry. The input is used when the + matching option is selected. + + +Properties +========== + +Type + Determines the type of the data that is handled by the node. + + +Outputs +======= + +Output + One of the inputs without any modifications.