godotengine / godot-proposals

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

Allow adding/editing TileSet layers in the new TileSet editor #3871

Open snailrhymer opened 2 years ago

snailrhymer commented 2 years ago

Describe the project you are working on

None - this follows on from the discussion on TileMap improvements found here:

https://github.com/godotengine/godot-proposals/issues/1769#issuecomment-1021753964

Describe the problem or limitation you are having in your project

Currently, if you are editing a TileSet in the TileSet Editor and try to e.g paint a new terrain on, this can't be done inside the editor. Users see that these things can be changed, but not how to change them:

image

image

It would be both more understandable for new users and more convenient for experienced users to be able to add/edit terrain sets, physics layers etc from inside the editor.

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

Include the necessary menus in the TileSet editor somehow. Below I propose one possible layout, but this is probably worth further discussion.

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

Add a new tab to the TileSet editor:

image

which exposes the same functionality to add and edit terrain sets and layers as is available in the Inspector.


Additionally, this could be made easier to reach by appending an "add new" to the dropdown menus in the "paint properties" mode:

image

image

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

This can be worked around by editing the layers in the inspector instead, but it will likely see use whenever people are setting up a TileSet.

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

This would improve the workflow of editing TileSets for most users.

groud commented 2 years ago

I think this will sadly be quite complex to implement, and might kind of break the "hierarchy" of what you are editing. It might be quite confusing to edit TileSet-wide properties while editing a TileSet source.

I am not sure this the right solution.

snailrhymer commented 2 years ago

It might be quite confusing to edit TileSet-wide properties while editing a TileSet source

Good point.

What If you only had the tab at the top: image Would that respect the hierarchy, and be less complex to implement?

Though with only that, I suppose there's little added benefit compared to just editing the layers in the inspector, beyond the mostly aesthetic ideal of having everything available in the TileSet editor.

wareya commented 2 years ago

This isn't just an aesthetic ideal, it's a basic usability problem. If the user creates a TileSet that belongs to a particular TileMap node, they can't create new terrain types unless they have the scene with the TileMap node focused, even though the TileSet editor itself is completely scene-focus-agnostic.

This means that, when they realize they need to manually add terrain types or physics layers, the user can poke around for ages for it, not realizing that they need to go to the scene the inline TileSet belongs to, focus the node that owns it, and then open up the resource inspector for the TileSet. Why would they think that they need to do that? The TileSet editor is already right there in front of them.

snailrhymer commented 2 years ago

Also good point. Especially alongside #3874, where a new user has possibly just learned the lesson of not looking to the inspector when they want to edit a TileSet.

Do you think the additional tab at the top of the TileSet editor would be an adequate solution? (Assuming it's reasonably implementable)

wareya commented 2 years ago

I do, though I think terrain sets and different layer types should probably all be different tabs (or at the very least, terrain sets should be a distinct tab from layers).

groud commented 2 years ago

Do you think the additional tab at the top of the TileSet editor would be an adequate solution? (Assuming it's reasonably implementable)

I guess it's acceptable. It's likely going to be quite complex to implement, as it's basically about re-creating what the inspector already features in an horizontal layout. One solution would be to re-use the inspector with a proxy object, only showing the layers related properties, but that might be not optimal.

I do, though I think terrain sets and different layer types should probably all be different tabs (or at the very least, terrain sets should be a distinct tab from layers).

I disagree on that, both are ways to "add features" to you TileSet, they are not much different aside from the naming. They should be in the same tab.