Navigation Menu

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

Layer groups / folders #454

Closed
amkk opened this issue Aug 21, 2014 · 15 comments
Closed

Layer groups / folders #454

amkk opened this issue Aug 21, 2014 · 15 comments
Assignees
Labels
feature Feature request, or something should be improved high priority timeline
Milestone

Comments

@amkk
Copy link

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)
|--Body(layer)
|--Arm(layer)

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
Copy link
Member

dacap commented Jul 1, 2016

There is already some work-in-progress for this feature (I think it will appear on v1.2 beta2).
https://twitter.com/davidcapello/status/741271831840194560

@dacap dacap changed the title Layer group/folder Layer groups / folders Jul 28, 2016
@dacap dacap added the timeline label Aug 9, 2016
@dacap
Copy link
Member

dacap commented Aug 25, 2016

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

@dacap dacap closed this as completed Aug 25, 2016
@nakedpony
Copy link

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

@dacap
Copy link
Member

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
Copy link
Member

dacap commented Sep 1, 2016

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

@nakedpony
Copy link

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
Copy link
Member

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.

@nakedpony
Copy link

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

@nakedpony
Copy link

@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 https://github.com/talecrafter/AnimationImporter 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
Copy link
Member

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
Copy link
Member

dacap commented Sep 13, 2016

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
Copy link
Member

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:

player-head-eyes.gif
player-head-shape.gif
player-body-arms.gif
player-body-shape.gif

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

player--head.gif
player--body.gif

Or these other files?

player-head-head.gif
player-body-body.gif

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:

player-head.gif
player-body.gif

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.

@nakedpony
Copy link

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

@lrtvri
Copy link

lrtvri commented Sep 15, 2016

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

@dacap
Copy link
Member

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

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 timeline
Projects
None yet
Development

No branches or pull requests

4 participants