mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.26k stars 1.76k forks source link

Layer display filters for Worlds #3956

Open eishiya opened 5 months ago

eishiya commented 5 months ago

When working with Worlds with many maps, it can be difficult to find a particular feature in the world, or to just appreciate one's work, due to needed layers being in the way. In a single map, one can temporarily hide the layers in the way, but this is impractical in a world with dozens or hundreds of maps.

In particular, Object Layers defining gameplay elements can get in the way of the cosmetic tiles underneath, making it harder to find specific maps by their appearance, especially when zoomed out due to the fixed size of Object borders and labels, and Image Layers that are meant as backgrounds of reference images can overlap other maps, either by being oversized, or due to otherwise transparent parts of maps overlapping (for example, many of my maps overlap because they have to be oversized to fit the foreground parallax elements). On the flip side, showing just the Object Layers can be useful as well, particularly in games that use a lot of Tile Objects that can fade into the tile layers around them.

I have two related feature requests that would make it easier to navigate complex Worlds by controlling layer visibility across the entire World:

  1. Hide or fade out layers by type (e.g. all Object Layers and/or all Image Layers, and/or all Tile Layers). This would help with the problem scenarios described above, and could be hotkeyed for quick access.
    • Hiding entire types of layers globally could lead to confusion of a user activates this by accident or forgets they did. By default, these actions should have no hotkeys associated with them, and if possible, the hidden layers should just be set to a low opacity. However, if a low opacity is used, they'll be affected by the same issue of adding up to being effectively opaque that affects Highlight Current Layer, see #3522
  2. Filtering by layer name, to make it easier to view all the layers of a particular name (or name pattern?) across the whole World. For example, one may want to view just the Platform layers in the world to make sure they all align well across maps, or one may want to see just the Temple Background layers to make sure distant views of a landmark make sense from different positions in the World, without the foreground parallax layers blocking their view.
    • Perhaps the "Filter by layer name..." action can bring up a widget similar to the Search Actions widget, just with the "search" bar (though suggestions of all used layer names would be very helpful!). The filter would be disabled when the widget is closed. It shouldn't close when focus is lost, however, since the user will likely want to pan across the world and maybe click and edit some maps.
    • As with hiding layers by type, I think ideally the other layers should be faded out rather than entirely hidden, to provide some context. However, if there's no stacking opacity mitigation, then it's better to hide them entirely than to risk this feature being made useless in maps with more than a few layers xP
    • This feature would probably obviate the need for a "Solo" layer option (#835) since it would basically be World-wide Solo.
    • It might also be useful to hide layers by name instead of showing by name. I don't know what the UI for that could be like. This would basically be a World-wide "Mute" layer option.

Although these options are most useful with Worlds, they can be good with single maps too, as a faster and temporary alternative to toggling layer visibility en masse, so these options should probably be in the View menu somewhere, rather than the World menu.