Maniphest T93920

Geometry nodes. Socket state stucks in single value state
Closed, ResolvedBUG

Assigned To
Hans Goudey (HooglyBoogly)
Authored By
Vyacheslav (hitrpr)
Dec 10 2021, 12:32 AM
Tags
  • BF Blender
  • Geometry Nodes
  • Nodes & Physics
Subscribers
Hans Goudey (HooglyBoogly)
Jacques Lucke (JacquesLucke)
Paul Kotelevets (1D_Inc)
Vyacheslav (hitrpr)
Tokens
"Love" token, awarded by 1D_Inc.

Description

System Information
Operating system: Windows-8.1-6.3.9600-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.41

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-05 22:47, hash: rB3f7014ecc9d5

For example if I connect single value input socket (svs) to field output, last one become svs.
But if I connect field input to svs, it will not force the last to change its state to field output.
Okay, it is not necessary to input field to field, but when all inputs and outputs disconnected, IMO node should reset types of sockets to default states.


Revisions and Commits

rB Blender
D13562

Event Timeline

Vyacheslav (hitrpr) created this task.Dec 10 2021, 12:32 AM
Hans Goudey (HooglyBoogly) changed the task status from Needs Triage to Confirmed.EditedDec 10 2021, 1:02 AM
Hans Goudey (HooglyBoogly) added projects: Geometry Nodes, Nodes & Physics.
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".
Hans Goudey (HooglyBoogly) added subscribers: Jacques Lucke (JacquesLucke), Hans Goudey (HooglyBoogly).

Haha, this is an funny one! I'm not actually sure it's technically a bug, but it sure doesn't make much sense.

You'll notice, if you switch back to the geometry mode on the switch node, that the old "X->False(Geometry)" link is still there. That's because the geometry sockets are still there, they're just hidden.

A few options I think:

  1. Make the code that decides whether sockets should be fields ignore these hidden links.
  2. Remove the old links when switching types, instead of keeping them around.
  3. Switch the links to the new socket when switching types.
  4. Wait to fix this until we have proper multi-type sockets.

@Jacques Lucke (JacquesLucke) Any opinion on which option is best? I like either 1 or 4.

Jacques Lucke (JacquesLucke) added a comment.Dec 10 2021, 12:19 PM

We could probably ignore unavailable sockets in the field inferencing in more places. Not sure if that has negative side effects, but I can't think of any right now.

Vyacheslav (hitrpr) added a comment.Dec 11 2021, 8:36 PM
In T93920#1269842, @Hans Goudey (HooglyBoogly) wrote:

Haha, this is an funny one! I'm not actually sure it's technically a bug, but it sure doesn't make much sense.

You'll notice, if you switch back to the geometry mode on the switch node, that the old "X->False(Geometry)" link is still there. That's because the geometry sockets are still there, they're just hidden.

Oh, forgot about it.
At one hand keeping the old root will keep the root in the case with accidental switch.
But, if Undo works properly, there is no need to keep the root, perhaps?
And yes, ofc old root (if it kept) shouldn`t determine socket type.

Switching link to new socket will be good for me, even if sockets incompatible. Motivation: I can insert convertor or cut, or switch back, without scrolling long tree.
In case of autocut and big distance between nodes I will be forced to find both and reconnect, or undo, insert reroute and switch. That is longer.

Paul Kotelevets (1D_Inc) awarded a token.Dec 12 2021, 2:14 AM
Paul Kotelevets (1D_Inc) added a subscriber: Paul Kotelevets (1D_Inc).EditedDec 12 2021, 2:22 AM

I think it is a matter of a node setup readability - the entire setup obtained this way (by locking value with another node) is implicit,
so it will be hard to read such a setups in case if it is made by other person who knows what's up and how exactly value was locked.
It will be impossible to reproduce such a setup from a screenshot, for example, having the same predictable result.
Implicit value typing is an issue.

Hans Goudey (HooglyBoogly) added a comment.Dec 12 2021, 5:41 AM

Totally agree. The way we handle type switching and hidden links is quite bad. We've been talking a bit about proper multi-type socket declarations recently, my hope is that will give us an opportunity to improve this.
I like the idea of switching the link to the new socket, I think that would be the best behavior.

Vyacheslav (hitrpr) added a comment.EditedDec 13 2021, 1:25 AM

I double, that there shouldn`t be hidden links.
But keeping route connected (to any new socket, even incompatible) is better than autocut, just because generally it is easier to cut route, than to reconnect it.

Hans Goudey (HooglyBoogly) moved this task from Backlog/Bugs to Waiting for Feedback/Review on the Geometry Nodes board.Dec 14 2021, 12:28 AM
Hans Goudey (HooglyBoogly) closed this task as Resolved by committing rBb44a500988f3: Fix T93920: Wrong field inferencing state with unavailable socket.Dec 14 2021, 3:31 PM
Hans Goudey (HooglyBoogly) claimed this task.
Hans Goudey (HooglyBoogly) added a commit: rBb44a500988f3: Fix T93920: Wrong field inferencing state with unavailable socket.