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
dacap opened this issue Jul 10, 2015 · 10 comments

Comments

@dacap
Copy link
Member

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 #1651

@dacap dacap added the enhancement 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
Add basic implementation of slice tool (#721) to modify theme parts
It still need support to export to .aseprite-data as <slice> XML elements, and animation support.
dacap added a commit that referenced this issue Apr 12, 2017
@SolarLune

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Sep 26, 2017

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Feb 10, 2018

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member Author

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
Add ability to edit multiple slices
Related to #721 and #1651, still need more work to give a better UX to
edit static and animated slices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.