Node panels without sockets disappear, making enums inaccessible. #119171

Closed
opened 2024-03-07 17:07:43 +01:00 by Hoshinova · 1 comment
Member

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

Blender Version
Broken: version: 4.2.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: Unknown

Description of error
When a node panel has an enum in it, the enum can depending on it's value make certain sockets available or unavailable.
However when all sockets in an panel are unavailable for certain values of the enum the entire panel including the enum disappears, making it impossible to bring the panel back.
This isn't an issue on any of the currently available nodes, but it is an issue on the node, that @Raiko is currently developing.
Example:
In this node, that is still in development there is an enum, that controls how many vector sockets there are in the panel.
Screenshot 2024-03-07 165658.png
For 1D it's 1 socket for 2D it's 2 sockets, etc.
Screenshot 2024-03-07 165610.png
Screenshot 2024-03-07 165623.png
In the case of 0D there are 0 vector sockets int the panel, so the entire panel including the enum disappears.
Screenshot 2024-03-07 165641.png

Now it is impossible to access the enum to bring the panel or any of it's sockets back.

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.23 **Blender Version** Broken: version: 4.2.0 Alpha, branch: Unknown, commit date: Unknown Unknown, hash: `Unknown` **Description of error** When a node panel has an enum in it, the enum can depending on it's value make certain sockets available or unavailable. However when all sockets in an panel are unavailable for certain values of the enum the entire panel including the enum disappears, making it impossible to bring the panel back. This isn't an issue on any of the currently available nodes, but it is an issue on the node, that @Raiko is currently developing. Example: In this node, that is still in development there is an enum, that controls how many vector sockets there are in the panel. ![Screenshot 2024-03-07 165658.png](/attachments/79661918-9924-40bb-acd1-fb805fcf4acf) For 1D it's 1 socket for 2D it's 2 sockets, etc. ![Screenshot 2024-03-07 165610.png](/attachments/35a13f62-7c89-4f77-a851-a93d93305f10) ![Screenshot 2024-03-07 165623.png](/attachments/56c4c62c-eb21-4b7f-a166-f5e278fe8daf) In the case of 0D there are 0 vector sockets int the panel, so the entire panel including the enum disappears. ![Screenshot 2024-03-07 165641.png](/attachments/f7bebd21-3cc2-4a6d-a7fe-15d07dfe7ba6) Now it is impossible to access the enum to bring the panel or any of it's sockets back.
Hoshinova added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-03-07 17:07:44 +01:00
Member

This is not currently an issue in Blender since we don't have nodes which have both panel header layouts and empty panels. Until then it's not a bug.

As a future solution, this would keep panels visible when they have a button function (this may not be the actual header layout, not sure how that works, but it would be similar):

diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 83370531f68..cbc331fdfae 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -694,6 +694,8 @@ static void node_update_panel_items_visibility_recursive(int num_items,
 
     if (item.is_valid_panel()) {
       SET_FLAG_FROM_TEST(item.state->flag, is_parent_collapsed, NODE_PANEL_PARENT_COLLAPSED);
+      SET_FLAG_FROM_TEST(
+          item.state->flag, item.panel_decl->draw_buttons != nullptr, NODE_PANEL_CONTENT_VISIBLE);
       /* New top panel is collapsed if self or parent is collapsed. */
       const bool is_collapsed = is_parent_collapsed || item.state->is_collapsed();
This is not currently an issue in Blender since we don't have nodes which have both panel header layouts _and_ empty panels. Until then it's not a bug. As a future solution, this would keep panels visible when they have a button function (this may not be the actual header layout, not sure how that works, but it would be similar): ```diff diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index 83370531f68..cbc331fdfae 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -694,6 +694,8 @@ static void node_update_panel_items_visibility_recursive(int num_items, if (item.is_valid_panel()) { SET_FLAG_FROM_TEST(item.state->flag, is_parent_collapsed, NODE_PANEL_PARENT_COLLAPSED); + SET_FLAG_FROM_TEST( + item.state->flag, item.panel_decl->draw_buttons != nullptr, NODE_PANEL_CONTENT_VISIBLE); /* New top panel is collapsed if self or parent is collapsed. */ const bool is_collapsed = is_parent_collapsed || item.state->is_collapsed(); ```
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-03-07 17:33:22 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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#119171
No description provided.