Skip to content

First Slice resets to first frame everytime aseprite is open #4062

Closed

Description

@npinochet

First, I know Slices are not meant to be used with animation frames, but I find them really useful when setting hitboxes on the animation frames. I wish the support for slices on frames could be better, but I can still use it as it is, it's not terrible. Having said that, there is one small bug that's really annoying, I tried to debug it looking at the source code but could not understand what is happening.

Steps to reproduce the bug

  • Create a blank project and add multiple frames.
  • Create a Slice on one frame. (not the first frame)
  • Change to another frame (not the first frame) and select the slice, this can be repeated multiple times.
  • Export the spritesheet with slice data
  • As you an see, the JSON file has slices for all the frames where the slice was selected.
  • Save the project, close aseprite and open the project again
  • If you export the spritesheet again, all the slice data will be the same, except for the first one, where it default to frame 0.

To illustrate the problem better, this is how a normal json file will display the slices on the JSON

"slices": [
   { "name": "Slice 1", "color": "#0000ffff", "keys": [{ "frame": 3, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }, { "frame": 5, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }, { "frame": 6, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }] }
]

Now, this is what happens if you restart aseprite and export again:

"slices": [
   { "name": "Slice 1", "color": "#0000ffff", "keys": [{ "frame": 0, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }, { "frame": 5, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }, { "frame": 6, "bounds": {"x": 3, "y": 5, "w": 10, "h": 8 } }] }
]

As you can see, the first frame gets set to 0.

It's a small change, but It's really annoying to change this slice every time I want to edit my file.

Thank you for the support, and for creating this amazing tool.

Aseprite and System version

  • Aseprite version: commit bcbe61c
  • System: macOS Ventura 13.4, Apple M1

Activity

  1. added 4 commits that reference this issue on Sep 23, 2023
    4d42267
    c3b22e7
    c9f3d82
    86e6cc6
  2. self-assigned this
    on Sep 25, 2023
  3. added a commit that references this issue on Sep 26, 2023
    c2daa2a
  4. added 2 commits that reference this issue on Oct 11, 2023
    017ecf2
    d1f000b
  5. added a commit that references this issue on Oct 11, 2023
    4fc36aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions