Shader Nodes: support Menu Switch node

This implements the Menu Switch node in shader nodes. It's the same node that is
used in Geometry Nodes and the Compositor.

The Menu Switch node is purely handled during preprocessing and thus builds on
top of #141936. Hence, it's input has to be a single value, just like the
iteration count for repeat zones. This limitation can be lifted in the future,
but currently there is no way to produce a non-single menu value in shader
nodes. This will become possible if other Switch nodes are added though.

Pull Request: https://projects.blender.org/blender/blender/pulls/146896
This commit is contained in:
Jacques Lucke
2025-09-29 17:26:38 +02:00
parent d75808fdf0
commit 02bdc709c2
11 changed files with 88 additions and 5 deletions

Binary file not shown.

Binary file not shown.

BIN
tests/files/render/node_inlining/menu_socket.blend (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.