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

Add a minimap to the GraphEdit #43416

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Nov 9, 2020

Closes godotengine/godot-proposals#672.

This is a port of my GDScript implementation with a few tweaks. As such, I expect that some things can be simplified to work better as a part of the engine core. I would appreciate pointers and suggestions for improvements.

Features:

  • Shows all nodes and connections as they appear relatively to each other;
  • Shows the viewport of GraphEdit's "camera".
  • Can be toggled off and resized;
  • Picks colors based on GraphNode's stylebox and connection colors, if it can.

Here's how it looks currently:

Editor look
Default theme look
Settings panel

It is supposed to be semi-transparent, but due to #43394, I am unable to tweak and test it in master.

Otherwise, this is the minimal implementation, but it can be enhanced in the future, if there is demand for it. Transparency for the editor tools can be turned into an editor setting. Additional visual features, such as suggested in the proposal like icons and shapes for nodes, can be implemented in some form. Node minimap colors can be made configurable as a separate GraphNode property. Etc.

I think this should be portable to 3.2 as well, and I can make a separate PR when this one is validated and approved.

PS. That zoom_hbox at the top can really use some semi-transparent background as well.

@fire
Copy link
Member

fire commented Nov 10, 2020

I'm not able to review right now, but I comment that I support adding a minimap.

Copy link
Member

@Chaosus Chaosus left a comment

Choose a reason for hiding this comment

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

Tested - seems perfect

@akien-mga akien-mga merged commit c83d1b2 into godotengine:master Dec 17, 2020
@akien-mga
Copy link
Member

Thanks!

I think this should be portable to 3.2 as well, and I can make a separate PR when this one is validated and approved.

Sounds good, please do.

I guess it would make sense to enable it in the VisualScript and Visual Shader editors in a follow-up PR?

@YuriSizov
Copy link
Contributor Author

YuriSizov commented Dec 17, 2020

I guess it would make sense to enable it in the VisualScript and Visual Shader editors in a follow-up PR?

It should already be enabled by default for every GraphEdit, because from the feedback I got from people I've shared my GDScript script with and from my proposal this seemed to be essential for usability. I can disable it by default and only turn it on for these editors, of course, if you want it.

Sounds good, please do.

Will do!

@Chaosus
Copy link
Member

Chaosus commented Dec 17, 2020

There are some problems with zooming in (they seems disconnected on minimap) + I would suggest to make lines a bit thinner:
image

@akien-mga
Copy link
Member

It should already be enabled by default for every GraphEdit, because from the feedback I got from people I've shared my GDScript script with and from my proposal this seemed to be essential for usability. I can disable it by default and only turn it on for these editors, of course, if you want it.

Ah no it's fine if it's enabled by default already. We'll see if this needs to changed based on player feedback, but it's good to make users aware of its existence :)

@YuriSizov
Copy link
Contributor Author

There are some problems with zooming in + I would suggest to make lines a bit thinner

Hm, I've definitely tested zooming in and out before. Need to look into it.
As for lines, I guess this is because of the antialiasing fixes in master? At any rate, I'll address all of this. Thanks for letting me know.

@Chaosus
Copy link
Member

Chaosus commented Dec 17, 2020

As for lines, I guess this is because of the antialiasing fixes in master?

Indeed, but I think it's easy can be fixed. Maybe AA should be disabled for these lines.

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.

Add an optional minimap to GraphEdit
5 participants