-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No disconnect when changing node type with less joints in visual shader editor #79417
Comments
I'd like to give this one a shot if no one is working on it |
I found the source of the issue, however I really am not sure about how to fix it. godot/scene/resources/visual_shader_nodes.cpp Line 4767 in 60f3b79
godot/scene/resources/visual_shader_nodes.cpp Line 4946 in 60f3b79
These methods just set the new vector type, and emit a signal to the editor. This signal gets handled by this method: godot/editor/plugins/visual_shader_editor_plugin.cpp Lines 180 to 186 in 60f3b79
As far as I can see, the update method has no way of knowing the number of ports has changed, so it can't take care of removing the extra connections when needed. The simplest solution I can think of would be to handle the signal with another method, similar to _expand_output_port. |
Another solution would be to compare the number of input/output ports between the start and the end of the update method. |
This is now fixed, it was in fact caused by my original code not fully fixing the problem |
Godot version
4.1.stable
System information
Ubuntu 22.04
Issue description
Visual shader editor should disconnect (at least visually) when we change the number of joints
before changing the type
after
this one break things
Steps to reproduce
You can see what to do to reproduce the bug in the screenshot
Minimal reproduction project
A visual shader, two nodes.
The text was updated successfully, but these errors were encountered: