Skip to content

Tileset tiles outside texture cannot be removed #85661

Description

@Lunarexxy

Godot version

4.2.stable

System information

Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 (NVIDIA; 31.0.15.3667) - 11th Gen Intel(R) Core(TM) i7-11700KF @ 3.60GHz (16 Threads)

Issue description

It's possible for a tileset to end up with tiles outside of the texture when the Separation and Margin values are changed. This is fine temporarily, the user might want to tweak the settings until everything lines up.

But, if those tiles are stuck outside of the texture when the user is done, there is no quick way to remove them. The drop-down button for removing tiles outside the texture is always greyed out. The button above it does not affect invalid tiles. Tiles outside the texture cannot be selected or erased.

image

The only quick ways to remove the invalid tiles, are to:

  • Remove the spritesheet from the tileset and try again, setting the proper values before creating any tiles.
  • Reload the project and reopen the tileset. Errors are printed to Output about invalid tiles. The option to remove invalid tiles is now enabled, even though the invalid tiles do not show up visually. Click it, save, and the issue is resolved.

Possibly an issue with #77986 not detecting these invalid tiles, and enabling the drop-down button when atlas settings are changed.

Steps to reproduce

Assuming you're using the provided spritesheet: (spritesheet.zip)

  • Create a spritesheet with separated tile sprites, or with margins around the edges
  • Create a tileset, and pull the spritesheet into it
  • Agree to the automatic tile creation (this can happen with manually created tiles too, this is just for speed)
  • Set Margin and Separation X/Y values to 32

You will end up with invalid tiles outside the texture that cannot be removed, until the project is reloaded

Minimal reproduction project

A project reload detects the invalid tiles and hides (but does not actually remove) them, so a full project MRP is not really useful for clear, accurate reproduction.

You can use the spritesheet below for testing, though. The tiles are 64x64, with a 32px margin and 32px separation.

spritesheet.zip

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions