godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 96 forks source link

Add scene file bookmarks and preset zooms #2206

Open chucklepie opened 3 years ago

chucklepie commented 3 years ago

Describe the problem or limitation you are having in your project

When you have a large scene file, e.g. a 2D tilemap or a big 3D area it is tedious and clunky navigating to common places in the scene file. Similarly you often wish to look at the scene at certain zoom levels (e.g. full extent, 10%, 100%, 200%).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

On the scene toolbar add a bookmark dropdown and zoom presets (hopefully better than my drawing).

image

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  1. Bookmark dropdown provides option to save current position as a bookmark and a list of the last X number of bookmarks for quick selection
  2. A number of preset zoom buttons, maybe assigned to keys, providing common zoom levels (maybe set within editor settings)

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't know, there might even be this facility already but I've never seen it.

Is there a reason why this should be core and not an add-on in the asset library?

Navigating the scene file to common places and setting zoom levels takes time and effort. A few toolbar buttons and/or key shortcuts would be just lovely.

Calinou commented 3 years ago

Scene bookmarks can already be achieved by adding Position2D or Position3D nodes in the scene tree, selecting them and pressing F. The upside of doing this is that bookmarks will be stored in version control, making teamwork easier.

As for zoom presets, I was thinking we could add a zoom modifier key to zoom to "power of two" levels: 12.5%, 25%, 50%, 100%, 200%, 400%, … This is useful for pixel art games when you want clean display.

chucklepie commented 3 years ago

Zoom sounds good. But position 2d nodes :-1: ;)

I think dedicated bookmarks would be much nicer than having to force create nodes in your scene file. You may not always be in the correct scene (it may be a linked/inherited scene, or you may just have a very large scene tree) and if your in or out of a tilemap you'd end up losing focus, etc.

EricEzaM commented 3 years ago

I would assume that these bookmarks would just be saved to the scene file, so they would be in source control anyway...

Sounds like a good idea, though, I think Ue4 has this if my memory serves me correctly?

chucklepie commented 3 years ago

Saved per scene file seems reasonable to me. I only work in 2D with large tilemaps and I only have multiple tilemaps in a scene when I use them as layers, so all I need at the minute is being able to jump between specific points, zoom to a screen size level and zoom to full extent. I don't know how scene instances within a scene would work...

Jummit commented 3 years ago

Should bookmarks be inherited from the parent scene?

Navigating the scene file to common places and setting zoom levels takes time and effort. A few toolbar buttons and/or key shortcuts would be just lovely.

How does that answer the "Should this be a plugin" question? This feature could easily be a plugin.

KoBeWi commented 3 years ago

I did some very big maps in Godot and zoom+scrolling was always enough for me to quickly move around.

Bookmarks exist in Script Editor, because it's common thing to jump around code, for definitions, variables etc. and pretty much every code editor have them. While, from my experience at least (not only with Godot), it's not that useful in map editors. You usually edit only one part of the level, there's no need to jump back and forth between points.

That said, if you really need this for your workflow, it's a perfect material for a plugin (just as Jummit said). I myself created a couple of plugins that extend editor in a way useful for me.

chucklepie commented 3 years ago

I did some very big maps in Godot and zoom+scrolling was always enough for me to quickly move around.

Bookmarks exist in Script Editor, because it's common thing to jump around code, for definitions, variables etc. and pretty much every code editor have them. While, from my experience at least (not only with Godot), it's not that useful in map editors. You usually edit only one part of the level, there's no need to jump back and forth between points.

That said, if you really need this for your workflow, it's a perfect material for a plugin (just as Jummit said). I myself created a couple of plugins that extend editor in a way useful for me.

Maybe if better zoom options are added moving around might be improved, especially if there is a 'zoom here' type option and the editor makes use of the right-click button (rather than just being for panning), e.g. press shortcut to zoom to extent of scene (full zoom out) then right-click and select 'zoom here'.

Actually, why does the Godot scene editor not have any right-mouse button context menu actions other than pan, is it by a decision to not use it?

btw, in Unity it has this option but it's a paid add on. But actually, look at this scene, are you saying you are happy zooming and panning all over the place if this large race track was your current scene?

image

Calinou commented 3 years ago

Actually, why does the Godot scene editor not have any right-mouse button context menu actions other than pan, is it by a decision to not use it?

We just don't know what to do with a right-click context menu for the 2D editor. Also, I'd prefer the right mouse button to remain available for panning so that trackpad users can still pan easily.

chucklepie commented 3 years ago

Now you do with my suggestion of move selected node here 😉

On Mon, 1 Feb 2021, 15:20 Hugo Locurcio, notifications@github.com wrote:

Actually, why does the Godot scene editor not have any right-mouse button context menu actions other than pan, is it by a decision to not use it?

We just don't know what to do with a right-click context menu for the 2D editor.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot-proposals/issues/2206#issuecomment-770934531, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCERRKXYKJYAT6PN4AIAODS43BFJANCNFSM4W2UHCVA .