Geometry Nodes: cycling through outputs with viewer node does not work with geometry output #105397

Closed
opened 2023-03-03 10:36:32 +01:00 by Sun Kim · 2 comments
Contributor

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 23.2.2.230217

Blender Version
Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-03 00:42, hash: 37c0b0b2b890
Worked: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-30 22:48, hash: rBea8fd343eb2c

Likely caused by 5c994d7846

Short description of error
Cycling through outputs with viewer node stuck if:

  • the input node has a geometry output
  • the geometry output is the first output of the node
  • the geometry output is already connected to the viewer node

Exact steps for others to reproduce the error
Video:

Test file: ViewerNodeGeoCycleTest.blend

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 23.2.2.230217 **Blender Version** Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-03 00:42, hash: `37c0b0b2b890` Worked: version: 3.5.0 Alpha, branch: master, commit date: 2023-01-30 22:48, hash: `rBea8fd343eb2c` Likely caused by 5c994d7846 **Short description of error** Cycling through outputs with viewer node stuck if: - the input node has a geometry output - the geometry output is the first output of the node - the geometry output is already connected to the viewer node **Exact steps for others to reproduce the error** Video: <video controls src="/attachments/badd9f9c-f28a-4ae7-942f-747e64973cae"></video> Test file: [ViewerNodeGeoCycleTest.blend](/attachments/b5a8de12-90d2-44a9-a505-13c1286cf22d)
Sun Kim added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-03 10:36:32 +01:00
Iliya Katushenock added the
Interest
Nodes & Physics
Interest
User Interface
labels 2023-03-03 13:12:08 +01:00

Even in older version, the link was stuck on geometry input, so not sure if I should confirm this as regression. will ask about priority too.

Even in older version, the link was stuck on geometry input, so not sure if I should confirm this as regression. will ask about priority too.
Hans Goudey added
Type
Bug
and removed
Type
Report
labels 2023-03-03 18:20:51 +01:00
Member

Happens because the socket to connect to the viewer is determined by first finding an existing viewed socket, then picking the next viewable, unconnected output and connect that. However, if a geometry output is already viewed, this check makes it so the algorithm thinks no output is connected (last_linked_socket_index == -1). Following the rule described, it then connects the first viewable output, which is the geometry socket again, so nothing actually changes.

        if (socket->type == SOCK_GEOMETRY && (target_node.flag & NODE_DO_OUTPUT)) {
          /* Skip geometry sockets connected to viewer nodes when deciding whether to cycle through
           * outputs. */
          continue;
        }

If the geometry socket is preceded by a non-geometry socket, then then last_linked_socket_index is that non-geometry socket, so the algorithm goes into the 2nd branch where it iterates after the found socket.

It's badly defined how this operator should work, but i think we can make it so the non-geometry sockets cycle through by ensuring it doesn't just reconnect the geometry output all the time.

Happens because the socket to connect to the viewer is determined by first finding an existing viewed socket, then picking the _next_ viewable, unconnected output and connect that. However, if a geometry output is already viewed, [this check](https://projects.blender.org/blender/blender/src/commit/cb20f2cbf993737db5201a3e8cb4c4588ef608e4/source/blender/editors/space_node/node_relationships.cc#L545-L549) makes it so the algorithm thinks _no_ output is connected (`last_linked_socket_index == -1`). Following the rule described, it then connects the first viewable output, which is the geometry socket _again_, so nothing actually changes. ``` if (socket->type == SOCK_GEOMETRY && (target_node.flag & NODE_DO_OUTPUT)) { /* Skip geometry sockets connected to viewer nodes when deciding whether to cycle through * outputs. */ continue; } ``` If the geometry socket is preceded by a non-geometry socket, then then `last_linked_socket_index` is that non-geometry socket, so the algorithm goes into the 2nd branch where it iterates _after_ the found socket. It's badly defined how this operator should work, but i think we can make it so the non-geometry sockets cycle through by ensuring it doesn't just reconnect the geometry output all the time.
Lukas Tönne self-assigned this 2023-03-16 16:54:39 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-03-20 14:10:15 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
3 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#105397
No description provided.