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

Comments

Projects
None yet
4 participants
@amkk

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 dacap added the enhancement label Aug 24, 2014

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

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

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

@dacap dacap added the high priority label Aug 13, 2015

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

@dacap dacap self-assigned this Nov 17, 2015

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

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Jul 1, 2016

Member

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

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 from Layer group/folder to Layer groups / folders Jul 28, 2016

@dacap dacap added the timeline label Aug 9, 2016

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Aug 25, 2016

Member

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

Member

dacap commented Aug 25, 2016

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

@dacap dacap closed this Aug 25, 2016

@nakedpony

This comment has been minimized.

Show comment
Hide comment
@nakedpony

nakedpony Sep 1, 2016

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

nakedpony commented Sep 1, 2016

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

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 1, 2016

Member

@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

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

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 1, 2016

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@nakedpony

nakedpony Sep 1, 2016

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.

nakedpony commented Sep 1, 2016

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

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 1, 2016

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@nakedpony

nakedpony Sep 1, 2016

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 commented Sep 1, 2016

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

This comment has been minimized.

Show comment
Hide comment
@nakedpony

nakedpony Sep 1, 2016

@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 :)

nakedpony commented Sep 1, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 13, 2016

Member

@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.)

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

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 13, 2016

Member

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).

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

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 13, 2016

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@nakedpony

nakedpony Sep 13, 2016

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

nakedpony commented Sep 13, 2016

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

@lrtvri

This comment has been minimized.

Show comment
Hide comment
@lrtvri

lrtvri Sep 15, 2016

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

lrtvri commented Sep 15, 2016

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

@dacap

This comment has been minimized.

Show comment
Hide comment
@dacap

dacap Sep 16, 2016

Member

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

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