blender/scripts/startup/bl_operators
Jacques Lucke 176c6ef329 Geometry Nodes: unify menu switch with other nodes with dynamic sockets
This changes the menu switch socket to use the socket-items system
(`NOD_socket_items.hh`) that is already used by the simulation zone, repeat
zone, bake node and index switch node. By using this system, the per-node
boilerplate can be removed significantly. This is especially important as we
plan to have dynamic socket amounts in more nodes in the future.

There are some user visible changes which make the node more consistent with
others:
* Move the menu items list into the properties panel as in 0c585a1b8a.
* Add an extend socket.
* Duplicating a menu item keeps the name of the old one.

There is also a (backward compatible) change in the Python API: It's now
possible to directly access `node.enum_items` and `node.active_index` instead of
having to use `node.enum_definition.enum_items`. This is consistent with the
other nodes. For backward compatibility, `node.enum_definition` still exists,
but simply returns the node itself.

Many API functions from `NodeEnumDefinition` like
`NodeEnumDefinition::remove_item` have been removed. Those are not used anymore
and are unnecessary boilerplate. If ever necessary, they can be implemented back
in terms of the socket-items system.

The socket-items system had to be extended a little bit to support the case for
the menu switch node where each socket item has a name but no type. Previously,
there was the case without name and type in the index switch node, and the case
with both in the bake node and zones. The system was trivial to extend to this
case.

Pull Request: https://projects.blender.org/blender/blender/pulls/121234
2024-04-30 10:19:32 +02:00
..
bmesh Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
__init__.py Fix #112377: Edit Source missing info in the status bar 2023-10-05 13:09:47 +11:00
add_mesh_torus.py Revert changes from main commits that were merged into blender-v4.1-release 2024-03-18 15:04:12 +01:00
anim.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
assets.py Refactor: scripts under scripts/startup/ to use str.format 2024-04-27 16:02:36 +10:00
clip.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
console.py Cleanup: replace {!s} with {:s} when used with strings 2024-04-27 16:02:37 +10:00
constraint.py License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
file.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
freestyle.py Refactor: scripts under scripts/startup/ to use str.format 2024-04-27 16:02:36 +10:00
geometry_nodes.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
image.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
mesh.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
node.py Geometry Nodes: unify menu switch with other nodes with dynamic sockets 2024-04-30 10:19:32 +02:00
object.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
object_align.py Revert changes from main commits that were merged into blender-v4.1-release 2024-03-18 15:04:12 +01:00
object_quick_effects.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
object_randomize_transform.py Revert changes from main commits that were merged into blender-v4.1-release 2024-03-18 15:04:12 +01:00
presets.py Cleanup: replace {!s} with {:s} when used with strings 2024-04-27 16:02:37 +10:00
rigidbody.py Fix #117547: RBD Bake to Keyframes no longer working 2024-01-30 10:54:05 +01:00
screen_play_rendered_anim.py Cleanup: replace {!s} with {:s} when used with strings 2024-04-27 16:02:37 +10:00
sequencer.py Cleanup: replace {!s} with {:s} when used with strings 2024-04-27 16:02:37 +10:00
spreadsheet.py License Headers: Set copyright to "Blender Authors", add AUTHORS 2023-08-16 00:20:26 +10:00
userpref.py Cleanup: remove trailing newlines from reports 2024-04-30 12:23:27 +10:00
uvcalc_follow_active.py Cleanup: reduce right-shift in startup scripts 2024-04-30 12:46:05 +10:00
uvcalc_lightmap.py Refactor: scripts under scripts/startup/ to use str.format 2024-04-27 16:02:36 +10:00
uvcalc_transform.py Revert changes from main commits that were merged into blender-v4.1-release 2024-03-18 15:04:12 +01:00
vertexpaint_dirt.py License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
view3d.py Cleanup: assign object & space variables from the context for reuse 2024-03-29 10:08:59 +11:00
wm.py Fix: string formatting issue on splash screen 2024-04-27 11:26:46 +02:00