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

Added Comment node to Visual Shaders #46273

Merged
merged 1 commit into from
Apr 4, 2021

Conversation

Chaosus
Copy link
Member

@Chaosus Chaosus commented Feb 21, 2021

I know this feature is long-awaited and desired.
comment

@YuriSizov
Copy link
Contributor

Shouldn't the description use more spacious, multiline TextEdit?

@Chaosus
Copy link
Member Author

Chaosus commented Feb 21, 2021

Shouldn't the description use more spacious, multiline TextEdit?

Yeah, thank you, fixed this to be like:
comment2

@AaronRecord
Copy link
Contributor

AaronRecord commented Feb 22, 2021

A suggestion, I don't know if this is even possible with godot's GraphNodes or if this has already been discussed, but I think it'd be more intuitive if instead of having to right click on it and use set title or set comment, if the title and comment were just a LineEdit and a TextEdit that you could just left click on to edit.

@akien-mga
Copy link
Member

A suggestion, I don't know if this is even possible with godot's GraphNodes or if this has already been discussed, but I think it'd be more intuitive if instead of having to right click on it and use set title or set comment, if the title and comment were just a LineEdit and a TextEdit that you could just left click on to edit.

That would be nice indeed if it's not too complex to implement with the current system. Maybe it could just be a GraphNode with a text field like the Expression node?

A potential drawback is that the text field would always be editable, while it might be useful to have separate edit and read-only mode, to prevent accidental edition / focus grab when clicking around? There could maybe be a checkbox to turn the TextEdit to read-only and avoid accidental edition? Just throwing some ideas.

I guess with this approach adding an actual custom title to the comment box might not be well supported, but a side question is whether that part of the feature is really useful? Code comments rarely start with a title either, though the use case here might be a bit different.

I'm not against the current implementation though, just throwing some ideas. Like always we should find the right tradeoff between ease of implementation/maintainability and user experience (so we shouldn't need to add e.g. 500 lines of code to support being able to use a text edit directly in the GraphNode).

@Ansraer
Copy link
Contributor

Ansraer commented Feb 24, 2021

I have another suggestion: what if we make the comment not a node but a semitransparent colored area instead. That would allow us to place nodes on top of it and visually group them together.

@AaronRecord
Copy link
Contributor

I have another suggestion: what if we make the comment not a node but a semitransparent colored area instead. That would allow us to place nodes on top of it and visually group them together.

Where would the comment go? On top like this?

Mockup

@Riteo
Copy link
Contributor

Riteo commented Feb 26, 2021

I have another suggestion: what if we make the comment not a node but a semitransparent colored area instead. That would allow us to place nodes on top of it and visually group them together.

Oh I thought it was supposed to work like that. Does the current proposed implementation just like add a text box in node space?

@YuriSizov
Copy link
Contributor

I have another suggestion: what if we make the comment not a node but a semitransparent colored area instead. That would allow us to place nodes on top of it and visually group them together.

That's exactly what a comment node is though. It's a GraphNode with the comment flag turned on, and it is displayed behind other nodes and is used for visual grouping. It's an existing functionality of GraphEdit.

@Riteo
Copy link
Contributor

Riteo commented Feb 26, 2021

I have another suggestion: what if we make the comment not a node but a semitransparent colored area instead. That would allow us to place nodes on top of it and visually group them together.

That's exactly what a comment node is though. It's a GraphNode with the comment flag turned on, and it is displayed behind other nodes and is used for visual grouping. It's an existing functionality of GraphEdit.

So It was supposed to work like that, nice :D

@YuriSizov
Copy link
Contributor

Yes, but looking at the code now, maybe this PR doesn't use existing functionality, but reimplements it instead. So I'm not sure anymore.

@Chaosus
Copy link
Member Author

Chaosus commented Feb 26, 2021

@pycbouh
image

@YuriSizov
Copy link
Contributor

All is good then, this should indeed already act exactly like @Ansraer wanted it to.

@Riteo
Copy link
Contributor

Riteo commented Feb 26, 2021

All is good then, this should indeed already act exactly like @Ansraer wanted it to.

Yeah I just tested it locally, it works exactly like that.

@akien-mga akien-mga merged commit cbf5408 into godotengine:master Apr 4, 2021
@akien-mga
Copy link
Member

Thanks!

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.

6 participants