Skip to content
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

Make the dragging connections more user-friendly in visual shaders #78547

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Jun 22, 2023

This implements the get_default_input_port function to VisualShaderNode, so now nodes can be connected to specified port by default when the new node created from dragging from output ports. Implemented the overrides for smoothstep/step nodes. Closes godotengine/godot-proposals#5090

vs_drag_enchancement

@Chaosus Chaosus requested review from a team as code owners June 22, 2023 07:40
@Chaosus Chaosus added this to the 4.2 milestone Jun 22, 2023
@Chaosus Chaosus force-pushed the vs_drag_enhancement branch 2 times, most recently from f80142a to c2131c3 Compare June 22, 2023 08:14
@Chaosus Chaosus requested a review from QbieShay June 22, 2023 09:07
Copy link
Contributor

@QbieShay QbieShay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works! Thank you so much 🙏

@RedMser
Copy link
Contributor

RedMser commented Jun 22, 2023

The method should probably take a "type" parameter, so that it can return different values depending on the data type of the connection. Since not all nodes have the same data types for all input ports.

@YuriSizov
Copy link
Contributor

@Chaosus What do you think about the suggestion above?

@Chaosus
Copy link
Member Author

Chaosus commented Jul 14, 2023

Sounds reasonable, I take a look to implement this...

PS: Done

@QbieShay
Copy link
Contributor

Hey! testted the smoothstep connection, thanks a lot for doing the groundwork for this improvement!

I don't think that the type is working? maybe i misunderstood how it works

@Chaosus
Copy link
Member Author

Chaosus commented Jul 15, 2023

I don't think that the type is working? maybe i misunderstood how it works

It has meaning only for VisualShaderNodeCustom currently, to override the required port for the specified types.

Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple suggestions for the documentation.

doc/classes/VisualShaderNode.xml Outdated Show resolved Hide resolved
doc/classes/VisualShaderNodeCustom.xml Outdated Show resolved Hide resolved
@Chaosus Chaosus merged commit f8dbed4 into godotengine:master Jul 20, 2023
@Chaosus Chaosus deleted the vs_drag_enhancement branch July 20, 2023 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make smoothstep and step nodes more user friendly
4 participants