Layer groups / folders #454

amkk opened this Issue Aug 21, 2014 · 15 comments


None yet
4 participants

amkk commented Aug 21, 2014

I want layer group like Photoshop.
I'm sure It's useful for pixel art too.

for example
2 layers in 1 group.
upper Body(group)

then you can manipulate 2layers at once.
(select human group ->select some region->You can transform(move,rotate,etc) Body and Arm layer at once.)
Thank you.

dacap added the enhancement label Aug 24, 2014

dacap added this to the v1.2 milestone Aug 31, 2014

dacap changed the title from Layer group to Layer group/folder Dec 30, 2014

@dacap dacap modified the milestone: v1.1, v1.2 Dec 30, 2014

dacap added the high priority label Aug 13, 2015

@dacap dacap modified the milestone: v1.2, v1.1 Nov 17, 2015

dacap self-assigned this Nov 17, 2015

@dacap dacap modified the milestone: v1.2, v1.3 May 30, 2016


dacap commented Jul 1, 2016 edited

There is already some work-in-progress for this feature (I think it will appear on v1.2 beta2).

dacap changed the title from Layer group/folder to Layer groups / folders Jul 28, 2016

dacap added the timeline label Aug 9, 2016


dacap commented Aug 25, 2016

Implemented, this will be included in the next v1.2-beta2

dacap closed this Aug 25, 2016

@dacap super! Will you also include a subfolder as a parameter for aseprite cli for --filename-format?


dacap commented Sep 1, 2016

@nakedpony I'm still thinking about this (as well as the Export Sprite Sheet when "Selected layers" are chosen). I think this is highly related to #1174


dacap commented Sep 1, 2016 edited

Maybe something like {layer} (the same as {layer0} for the first level), {layer1}, {layer2} etc. What do you think?

I guess it makes sense to be able to filter out layers/folders by by index as well as by name if I understand correctly your approach in #1174 and with folders.


dacap commented Sep 1, 2016

I was thinking and they are two different things. #1174 talks about a way to filter layers by name (I still need a syntax children, e.g. --layer "parent > child" to pick just one children).

The other one is about --filename-format or --save-as: For example --save-as {layer}-{layer1}-{frame}.png to save each frame of each layer with filenames like TopLevelLayerName-FirstChild-0.png, TopLevelLayerName-SecondChild-0.png, etc.

Anyway I'm not yet sure about this {layer1} syntax. Maybe {layer} should be always the layer name (in case we want to save all layers/groups/children with its layer name --save-as {layer}.png should work). And we could add new terms like {group} to indicate the name of the first parent group, {surgroup} for the parent of the parent, etc.

Oh, I see now. You want to introduce multiple nesting of the layers. So I think that selecting layers could be as you described. And I guess --layer "parent > child" would imply --layer "parent > child > *".
Though at the moment it's possible to just hide non wanted layers in UI so they won't be neither listed via --list-layers nor imported (means some manual work).

As for format when importing deep nested structure of layers... Let's look at the variants:

  • {layer1}-{layer2}-{layer3}-{layer4}-{frame}.png - would work for any amounts of levels but not backward compatible. Because some people would still use {layer}
  • {layer}-{sublevel1}-{sublevel2}-{sublevel3}-{frame}.png - this one is backward compatible and would scale
  • {layer}-{group}-{subgroup}-{subsubgroup?}-{frame}.png - doesn't really scale

@dacap BTW it would be a huge improvement if every layer could be exported separately to multiple tags aka animations to unity format. Similar to this script but splittable by layer. Just a task I'm struggling with at a moment. I guess it could make aseprite even more popular and easy to use :)


dacap commented Sep 13, 2016

@nakedpony about the improvement "if every layer could be exported separately to multiple tags," I'm not sure if I understood this correctly, but actually on v1.2-beta1 you can use something like:

aseprite -b myfile.ase --save-as '{layer}-{tag}-{frame}.png'

Or maybe you want all frames of each "layer+tag" combination in one .png? In that case I'm thinking that we might have something like:

aseprite -b myfile.ase --sheet '{layer}-{tag}.png' --data '{layer}-{tag}.json'

(Not yet implemented.)


dacap commented Sep 13, 2016 edited

About the group identifiers, I've found an alternative:

  • {layer} identifies the current layer (it can be a group or layer)
  • {group} identifies the first parent/group
  • {parent1}={parent}={group}
  • {parent2} the parent of the parent, etc.
  • {topgroup} the first group in the hierarchy of the current layer
  • {topgroup1}={topgroup}
  • {topgroup2} the child of the first group, etc.

I'll just add {group} for the first iteration (v1.2-beta2).


dacap commented Sep 13, 2016

I'm implementing this and more tricky scenarios are appearing. For example, if we have this structure:

screen shot 2016-09-13 at 5 14 20 pm

We might try to use:

aseprite -b player.ase --save-as player-{group}-{layer}.gif

In this case, I'm sure that this should generate at least 4 files:


But I'm not quite sure about the other layers (the groups). Should it generate the following files?


Or these other files?


I think that in this case it should generate 4 files and nothing else. And if we use the following command:

aseprite -b player.ase --save-as player-{group}.gif

It generates the following files:


There are a lot of tricky combinations and I'm not so sure what to do on each case. I'll thinking more about this and try to find a "good enough implementation" for the first version.

going to take a look at this thread later tomorrow :)

lrtvri commented Sep 15, 2016

it's more than enough for me for the first version :)


dacap commented Sep 16, 2016

There is a part of this issue that wasn't yet implemented and I'll try to implement for v1.2-beta3, #1238

dacap referenced this issue Nov 7, 2016


Linked Layers #1318

@dacap dacap added a commit that referenced this issue Nov 30, 2016

@dacap dacap Add support to move layer groups with the move tool
Related to #1172, #1318, #454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment