Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice tool #721

Open
3 of 5 tasks
Tracked by #4180
dacap opened this issue Jul 10, 2015 · 13 comments
Open
3 of 5 tasks
Tracked by #4180

Slice tool #721

dacap opened this issue Jul 10, 2015 · 13 comments
Labels
feature Feature request, or something should be improved high priority slices
Milestone

Comments

@dacap
Copy link
Member

dacap commented Jul 10, 2015

Add a tool to mark rectangular (any shape?) regions and label them. Then we should be able to export the specific slice/region using #645.

  • add --list-slices (print slices on output or/and export to json file)
  • support to export only the area of a specific slice (e.g. --slice name)
  • support to export all slices like --save-as sheet-{slice}.png (like a --split-slices)
  • animation support for slices
  • review Quality of Life improvements for working with slices #1651
@dacap dacap added the feature Feature request, or something should be improved label Jul 10, 2015
This was referenced Jul 10, 2015
@dacap dacap added this to the v1.4 milestone Jul 10, 2015
@dacap dacap added the slices label Oct 6, 2016
@dacap dacap modified the milestones: v1.2, v1.5 Feb 18, 2017
@dacap dacap self-assigned this Feb 18, 2017
dacap added a commit that referenced this issue Mar 6, 2017
It still need support to export to .aseprite-data as <slice> XML elements, and animation support.
@SolarLune
Copy link

SolarLune commented Apr 24, 2017

Hey, it's cool to see slices in Aseprite, but are they being exported? I don't see anything in the outputted JSON file, and I don't see any "aseprite-data" file options...?

EDIT: And I do have the Slices checkbox selected in the Export dialog.

@dacap
Copy link
Member Author

dacap commented Apr 24, 2017

Hi @SolarLune, you have two options: one using --list-slices and --data in the CLI or using a special .aseprite-data file e.g. your sprite is player.ase you can create a player.aseprite-data with this content:

<?xml version="1.0" encoding="utf-8"?>
<sprite>
  <slices />
</sprite>

This is an undocumented feature, I need to write more details about this.

EDIT: Tomorrow I'll test the Slices checkbox in the export dialog just in case, something might not be working (did you try using other checkbox like layers too?)

@SolarLune
Copy link

SolarLune commented Apr 24, 2017

This is an undocumented feature, I need to write more details about this.

Ah, OK. I guess I'll wait - seems like that file would basically just be empty tagged like that...? Not sure if I get what it's supposed to do. A write-up would be helpful (though I usually get by with the GUI, so no rush, for me).

something might not be working (did you try using other checkbox like layers too?)

Yeah, the other options work, but just not the Slices option.

@SolarLune
Copy link

Hey, just wanted to pop up in here and ask if slices could serve the purpose of defining hitboxes / specific important zones when implemented? Or is that a different concept?

@tkotha
Copy link

tkotha commented Jan 29, 2018

I'm responding to solarlune, but judging from the JSON data, it looks like each slice keeps track of its own history throughout the animation of the aseprite file. In theory this could mean that for a given animation you would be able to do basic hitbox tracking, but all slices are on the screen at once, which could get tricky to manage.
if you have multiple animations in one file, this is also tricky because any slice introduced has to be available for the ENTIRE file, not just an animation clip, which can lead to really cluttered views. So yes it can, but i think there's a bit of a management game to be played here

@SolarLune
Copy link

Yo, thanks for the expansion on the data. From @dacap's explanation in #1651, he's got a good grasp of the idea of properly implementing slice animations, in a sense, which is great!

@oceanhahn
Copy link

oceanhahn commented Feb 10, 2018

Hey there, just a quick request from the cheap seats, but is there any quick explanation out there for exactly what slices can do and what they are for? I would love to know more about them! :D

#1651 gives a lot of information on what they perhaps ought to do eventually, but I find myself wondering how I can make use of them now.

Is there a link I could follow to learn more?
Many thanks! :D

@SolarLune
Copy link

SolarLune commented Sep 26, 2018

OK, I just tried exporting Slices again and it seems like they're being exported in JSON from the sprite now, which is great. Thanks, @dacap!

@oceanhahn I don't know if you never got the answer, but basically, it's a way to define rectangles that can be exported from your animation along with your actual image. So this could be used for hitboxes, collision areas for tiles, etc. EDIT: Looks like it could also be used for things like separating an image out (so, for example, for GUI, which is inventive). Check out a bit of a discussion about it here: https://community.aseprite.org/t/slice-tool-how-does-it-work/143/4

@EyeGem
Copy link

EyeGem commented Feb 13, 2019

  1. View -> Show -> Slices Names / Slices UserData / Slices Info
  2. allow CTRL to show visible slices names (with user data next row)
  3. move them to Slices Layer to allow hide/show groups of slices (leave global slices as special case)
  4. allow to open list of slices inside Slices Layer and edit their keyframes with no-keyframe (not visible)
  5. add "Hide Slice(s)" option to popup menu over slice(s)
  6. allow select multiple slices & edit their merged properties (name, user data, x/y/w/h, etc)
  7. allow hide/delete multiple slices and "Select All Slices" (Ctrl+A in Slice Tool mode?)
  8. allow CTRL+C/X/V for slices
  9. highlight clicked slice, allow click next slice at same point (for intersecting slices) with click-without-drag and then move/resize this one slice with click-and-drag (also highlighting whle dragging/resizing)

@dacap
Copy link
Member Author

dacap commented Feb 13, 2019

  • View -> Show -> Slices Names / Slices UserData / Slices Info

👍

  • allow CTRL to show visible slices names (with user data next row)

Not sure about this one (because it mixes with the Move tool). Also the Move tool requires some extra functionality to move slices too (the same for selection transformation).

  • move them to Slices Layer to allow hide/show groups of slices (leave global slices as special case)
  • allow to open list of slices inside Slices Layer and edit their keyframes
  • add "Hide Slice" option to slice context popup menu

There are plans to integrate Slices in the Timeline in that way but it was too much work for v1.2 so it was never done. It's planned for 1.3.

  • allow select multiple slices & edit their merged properties (name, user data, x/y/w/h, etc)

👍 requested several times by other users too

  • allow hide/delete multiple slices and "Select All Slices" (Ctrl+A in Slice Tool mode?)
  • allow CTRL+C/X/V for slices

👍

  • highlight clicked slice, allow click next slice at same point (for intersecting slices) with click-without-drag and then move/resize this one slice with click-and-drag (also highlighting whle dragging/resizing)

I'll see the exact details about selecting one slice/multiple slices later.

dacap added a commit that referenced this issue May 2, 2019
Related to #721 and #1651, still need more work to give a better UX to
edit static and animated slices.
@jsmars
Copy link

jsmars commented Nov 1, 2019

Any status on when we can expect animation support for slices? It's a real hassle that they don't work now for production work. Above features are all nice to have, but imo for slices to be at all usable I would at least like to see these must haves:

  • Slices follow frames when moving, inserting and deleting
  • Exported slices data don't have duplicate entries in a row if their data is identical (as they currently do if one has been edited and then changd back)

@npinochet
Copy link
Contributor

Hi, I would really like to have slices be placed one per frame, is there a way I can help this become a reality? I'm not good programming in c++, but maybe I can patronize it somehow?

@RandyGaul
Copy link

Just popping in to mention I’m most excited about this feature of all the new aseprite work! I’ve had to write my own separate editor for adding in the equivalent of slices per frame, which complicates the art pipeline quite a lot! Would love to specify this and export the .ase file directly.

I wrote an aseprite file loader in C here and would love to use .ase files directly and load them directly into game without any other steps. However, the need for animated slices for my game makes this impossible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request, or something should be improved high priority slices
Projects
None yet
Development

No branches or pull requests

8 participants