mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Scripting: batch add/remove layers #3329

user72356 posted onGitHub

Is your feature request related to a problem? Please describe. I maintain a script that frequently adds/removes all layers on a map. At this time I have to call addLayer() and removeLayer() for each individual layer. For large maps this can be noticeably slow.

Describe the solution you'd like I would like an addLayers(layers: Layer[]) function that takes an array of Layer[] to be added to the map.

I would also like a removeLayers() function that removes all layers, and a removeLayersAt(from: number, to: number) function that removes the layers between the provided indices.

Describe alternatives you've considered No alternatives possible.


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests