mathnode socket doesn't restore when voronoi signal is turned to #73211

Open
opened 2020-01-18 10:09:15 +01:00 by user1 · 6 comments

System Information
Operating system: Linux-4.15.0-66201911071317-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GT 630/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116

Blender Version
Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-30 18:20, hash: 56ef761381
Worked: (optional)

Short description of error
the mathnode after a voronoi tex node ejects the noodle when you switch voronoi to "n-sphere radius" and keeps hiding any values.

Exact steps for others to reproduce the error
open blender
create a material for an object of your choice
add voronoi and mathnode as shown in the picture
switch voronoi from f1 to n-sphere radius
notice that the mathnode disconnenćts, which is fine, butit should re-open the slot then, right?

Bildschirmfoto zu 2020-01-18 10-08-45.png

**System Information** Operating system: Linux-4.15.0-66201911071317-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: GeForce GT 630/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.116 **Blender Version** Broken: version: 2.82 (sub 6), branch: master, commit date: 2019-12-30 18:20, hash: `56ef761381` Worked: (optional) **Short description of error** the mathnode after a voronoi tex node ejects the noodle when you switch voronoi to "n-sphere radius" and keeps hiding any values. **Exact steps for others to reproduce the error** open blender create a material for an object of your choice add voronoi and mathnode as shown in the picture switch voronoi from f1 to n-sphere radius notice that the mathnode disconnenćts, which is fine, butit should re-open the slot then, right? ![Bildschirmfoto zu 2020-01-18 10-08-45.png](https://archive.blender.org/developer/F8284931/Bildschirmfoto_zu_2020-01-18_10-08-45.png)
Author

Added subscriber: @user1

Added subscriber: @user1

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscribers: @OmarEmaraDev, @JacquesLucke

Added subscribers: @OmarEmaraDev, @JacquesLucke
Member

This is a possible solution to the issue:

diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 9e52f7ea939..b4bdbd97fbe 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -3336,8 +3336,10 @@ void ntreeTagUsedSockets(bNodeTree *ntree)
   }
 
   for (link = ntree->links.first; link; link = link->next) {
-    link->fromsock->flag |= SOCK_IN_USE;
-    link->tosock->flag |= SOCK_IN_USE;
+    if ((link->fromsock->flag & SOCK_UNAVAIL) == 0 && (link->tosock->flag & SOCK_UNAVAIL) == 0) {
+      link->fromsock->flag |= SOCK_IN_USE;
+      link->tosock->flag |= SOCK_IN_USE;
+    }
   }
 }

This redefines SOCK_IN_USE from "socket that has any incident link" to "socket that is available and is linked to any other available socket". This might conflict with some versioning code from @OmarEmaraDev though.

This is a possible solution to the issue: ``` diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 9e52f7ea939..b4bdbd97fbe 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -3336,8 +3336,10 @@ void ntreeTagUsedSockets(bNodeTree *ntree) } for (link = ntree->links.first; link; link = link->next) { - link->fromsock->flag |= SOCK_IN_USE; - link->tosock->flag |= SOCK_IN_USE; + if ((link->fromsock->flag & SOCK_UNAVAIL) == 0 && (link->tosock->flag & SOCK_UNAVAIL) == 0) { + link->fromsock->flag |= SOCK_IN_USE; + link->tosock->flag |= SOCK_IN_USE; + } } } ``` This redefines `SOCK_IN_USE` from "socket that has any incident link" to "socket that is available and is linked to any other available socket". This might conflict with some versioning code from @OmarEmaraDev though.
Member

@JacquesLucke Taking a quick look at the versioning code. It seems versioning is done before any update take place. So it doesn't seem like this change will affect versioning. I will take a closer look later.

@JacquesLucke Taking a quick look at the versioning code. It seems versioning is done before any update take place. So it doesn't seem like this change will affect versioning. I will take a closer look later.
Member

Unfortunately, I was wrong. This does break versioning.

Unfortunately, I was wrong. This does break versioning.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:07 +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
4 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#73211
No description provided.