'Menu Switch' node's default enum value doesn't work correctly with "Reset to Default Value" operator #127056

Open
opened 2024-09-01 23:25:02 +02:00 by Xury Greer · 2 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23

Blender Version
Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: 396f546c9d82
Worked: Never, the issue is present in 4.1.1 and 4.2.1

Short description of error
The 'Menu Switch' node allows for picking an enum value via a 'Menu' socket.
A default value can be chosen for a 'Menu' socket.
This default option isn't always respected, and there are at least two issues with it:

  1. Using the 'Reset to Default Value' operator doesn't respect the default value. It instead seems to always default to the first value that was created for the enum (index 0).

  2. Rearranging the enum 'Menu Items', or removing a 'Menu Item' doesn't seem to update the indices.

Exact steps for others to reproduce the error
Setup:

  1. Make a new geometry nodes modifier.
  2. Make a menu switch node
  3. Hook up a Menu socket from the Group Input node.
  4. Hook up some values into the menu switch (See the attached .blend file for this basic setup).

Hover over the Menu option in the modifier and hit backspace to use the 'Reset to Default Value' operator.
This works because the menu options were added in order and haven't been rearranged.

Issue #1:
Change the default value of the menu socket.
Try using the 'Reset to Default Value' operator.
It doesn't reset to the default value, instead it resets to the option at index 0.

Issue #2:
Remove the first menu option from Menu Switch node.
Try using the 'Reset to Default Value' operator.
It doesn't reset to the default value, instead it makes the option blank, presumably because it's trying to use the option at index 0 but it has been removed, and the indices haven't been updated.

Rearranging the menu items also doesn't seem to update the indices.

Note: The default value IS respected when assigning the geometry nodes to an object for the first time. Just not when using the Reset to Default Value operator.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23 **Blender Version** Broken: version: 4.2.1 LTS, branch: blender-v4.2-release, commit date: 2024-08-19 11:21, hash: `396f546c9d82` Worked: Never, the issue is present in 4.1.1 and 4.2.1 **Short description of error** The 'Menu Switch' node allows for picking an enum value via a 'Menu' socket. A default value can be chosen for a 'Menu' socket. This default option isn't always respected, and there are at least two issues with it: 1. Using the 'Reset to Default Value' operator doesn't respect the default value. It instead seems to always default to the first value that was created for the enum (index 0). 2. Rearranging the enum 'Menu Items', or removing a 'Menu Item' doesn't seem to update the indices. **Exact steps for others to reproduce the error** Setup: 1. Make a new geometry nodes modifier. 2. Make a menu switch node 3. Hook up a Menu socket from the Group Input node. 4. Hook up some values into the menu switch (See the attached .blend file for this basic setup). Hover over the Menu option in the modifier and hit backspace to use the 'Reset to Default Value' operator. This works because the menu options were added in order and haven't been rearranged. Issue #1: Change the default value of the menu socket. Try using the 'Reset to Default Value' operator. It doesn't reset to the default value, instead it resets to the option at index 0. Issue #2: Remove the first menu option from Menu Switch node. Try using the 'Reset to Default Value' operator. It doesn't reset to the default value, instead it makes the option blank, presumably because it's trying to use the option at index 0 but it has been removed, and the indices haven't been updated. Rearranging the menu items also doesn't seem to update the indices. Note: The default value IS respected when assigning the geometry nodes to an object for the first time. Just not when using the Reset to Default Value operator.
Xury Greer added the
Severity
Normal
Type
Bug
Status
Needs Triage
labels 2024-09-01 23:25:02 +02:00
Member

Hi, thanks for the report. Can confirm

Hi, thanks for the report. Can confirm
Member

because it's trying to use the option at index 0 but it has been removed, and the indices haven't been updated.

This is likely related to my explanation from #126736 (comment)

> because it's trying to use the option at index 0 but it has been removed, and the indices haven't been updated. This is likely related to my explanation from https://projects.blender.org/blender/blender/issues/126736#issuecomment-1279087
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#127056
No description provided.