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

Select/draw/del/C&P in multiple layers #282

Closed
olmototis opened this Issue Sep 20, 2012 · 36 comments

Comments

@olmototis

olmototis commented Sep 20, 2012

Hi, a little request:
It'll be awesome if you could select multiple layers and work with all at the same. For example:

You select 3 layers, then make a tile selection, copy and paste. Each tile could be drawed on the same layer name, or maybe on the current selected layers, respecting the same order (or something like that).

I usually have zones drawed in 3/4 layers that I want to repeat in the map, and I have to C/P each layer.

Thank you very much, and sorry for my english :)
(I don't know if this is the right place for doing requests, if not, delete it ;)

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 2, 2013

Owner

I fully agree Tiled needs this feature, but I'm unsure how to best implement it. Problem areas:

  • If we match by layer index, the target map might not have these indexes or it might have different kinds of layers at these indexes.
  • If we match by layer name, the target map might not have layers with the same name, it might have multiple layers with those names and it might have layers with the same name but that are of a different kind.
  • If we require the user to select the target layers, I reckon the whole process will feel quite clumsy. And, what if the user pastes before doing this selection, or what if his selection does not match with the copied layer count, or selected layers are of different kinds?
  • Currently pasting puts the copied part in the stamp brush, so you can then place it where you want. In order to do multi-layer paste, we either need to change this approach or make the stamp brush deal with a multi-layer stamp somehow.
  • How to deal with copy & paste when it involves different kinds of selected layers? (also regarding the use of the stamp brush in case of tile selection)
Owner

bjorn commented Mar 2, 2013

I fully agree Tiled needs this feature, but I'm unsure how to best implement it. Problem areas:

  • If we match by layer index, the target map might not have these indexes or it might have different kinds of layers at these indexes.
  • If we match by layer name, the target map might not have layers with the same name, it might have multiple layers with those names and it might have layers with the same name but that are of a different kind.
  • If we require the user to select the target layers, I reckon the whole process will feel quite clumsy. And, what if the user pastes before doing this selection, or what if his selection does not match with the copied layer count, or selected layers are of different kinds?
  • Currently pasting puts the copied part in the stamp brush, so you can then place it where you want. In order to do multi-layer paste, we either need to change this approach or make the stamp brush deal with a multi-layer stamp somehow.
  • How to deal with copy & paste when it involves different kinds of selected layers? (also regarding the use of the stamp brush in case of tile selection)
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 3, 2013

Owner

Also, once #149 is implemented, tile layer selection can't even be reliably applied to all tile layers anymore. Not sure how to solve that yet either.

Owner

bjorn commented Mar 3, 2013

Also, once #149 is implemented, tile layer selection can't even be reliably applied to all tile layers anymore. Not sure how to solve that yet either.

@olmototis

This comment has been minimized.

Show comment
Hide comment
@olmototis

olmototis Mar 3, 2013

(I've read your last comment while writing, I comment it at the end)

I have been thinking about the best solution, and I have this possibility:

  • Layer match by layer order.
    • Independently of the layer index / name. If you copy from layers 1, 3 and 5. Then select layers 3, 6 and 9 and paste, layer 1 selection will be pasted on layer 3, 3 on 6 and 5 on 9.
    • That's not a big problem, commonly you will copy and paste from and to the same layers (e.g to move or to clone a building). And if not, you have to select the new layers (normal), and the tiles will be pasted respecting the same order (so the result will be the same, but on other layers).
    • origin_layers < destination_layers = paste in order and ignore last destination_layers, the tiles will be pasted only on the first X layers.
    • origin_layers > destination_layers = ignore last origin_layers. If you've copied 4 layers, you select only 2 and paste, only the first 2 layers will be pasted. If you make a mistake, you will see easily that the result is not "complete" and you need to select more layers.
  • Layer type, ignore non tile layers when pasting.
  • Updating the stamp brush would be incredible. However, if it is complicated, when copying more than 1 layer, the stamp brush wont show the "result". You will see the effect when pasting. If you are not happy, ctrl Z and repeat :)
  • Regarding your last comment about issue #149 :
    • I really don't know if you are working on that, but it is a very good feature.
    • The easiest solution is not to permit selection when the layers have <> types/tile_size. A good way for selecting layers could be pressing ctrl + clicking on the layers. Once you have selected the first layer, if you move the cursor to a layer with <> type, a little "x" or a message could appear beside the cursor while pressing ctrl. You can't select this layer. When pasting, the process will be the same as above. Respecting the order, and ignoring <> layers (type, size, etc.)

I'm not a good coder, so it's nearly impossible for me to implement it. My only help could be to test, to help with design and donate some $

olmototis commented Mar 3, 2013

(I've read your last comment while writing, I comment it at the end)

I have been thinking about the best solution, and I have this possibility:

  • Layer match by layer order.
    • Independently of the layer index / name. If you copy from layers 1, 3 and 5. Then select layers 3, 6 and 9 and paste, layer 1 selection will be pasted on layer 3, 3 on 6 and 5 on 9.
    • That's not a big problem, commonly you will copy and paste from and to the same layers (e.g to move or to clone a building). And if not, you have to select the new layers (normal), and the tiles will be pasted respecting the same order (so the result will be the same, but on other layers).
    • origin_layers < destination_layers = paste in order and ignore last destination_layers, the tiles will be pasted only on the first X layers.
    • origin_layers > destination_layers = ignore last origin_layers. If you've copied 4 layers, you select only 2 and paste, only the first 2 layers will be pasted. If you make a mistake, you will see easily that the result is not "complete" and you need to select more layers.
  • Layer type, ignore non tile layers when pasting.
  • Updating the stamp brush would be incredible. However, if it is complicated, when copying more than 1 layer, the stamp brush wont show the "result". You will see the effect when pasting. If you are not happy, ctrl Z and repeat :)
  • Regarding your last comment about issue #149 :
    • I really don't know if you are working on that, but it is a very good feature.
    • The easiest solution is not to permit selection when the layers have <> types/tile_size. A good way for selecting layers could be pressing ctrl + clicking on the layers. Once you have selected the first layer, if you move the cursor to a layer with <> type, a little "x" or a message could appear beside the cursor while pressing ctrl. You can't select this layer. When pasting, the process will be the same as above. Respecting the order, and ignoring <> layers (type, size, etc.)

I'm not a good coder, so it's nearly impossible for me to implement it. My only help could be to test, to help with design and donate some $

@gamedevsam

This comment has been minimized.

Show comment
Hide comment
@gamedevsam

gamedevsam Mar 4, 2013

Its my personal experience that donating some $ gives bjorn great motivation to work on requests (so please donate if you can, this is a great program for the game development community). However, this is quite a big request and might take a while to complete. This would be a great addition to the program, and as a fellow tiled user, I thank you for your suggestions :)

gamedevsam commented Mar 4, 2013

Its my personal experience that donating some $ gives bjorn great motivation to work on requests (so please donate if you can, this is a great program for the game development community). However, this is quite a big request and might take a while to complete. This would be a great addition to the program, and as a fellow tiled user, I thank you for your suggestions :)

@GeorgeBroussard

This comment has been minimized.

Show comment
Hide comment
@GeorgeBroussard

GeorgeBroussard Aug 12, 2014

Could you have a mode where you highlight a section and you can then drag it to a new place in the map, and have it affect all layers within the highlight region? You could also rotate the selection. This alone would make working on maps a lot easier and save a lot of time.

GeorgeBroussard commented Aug 12, 2014

Could you have a mode where you highlight a section and you can then drag it to a new place in the map, and have it affect all layers within the highlight region? You could also rotate the selection. This alone would make working on maps a lot easier and save a lot of time.

@saluk

This comment has been minimized.

Show comment
Hide comment
@saluk

saluk Mar 24, 2015

I really would like this feature. I have fairly complex trees in my scene, which end up being 4 or 5 layers deep. The only way to copy and paste trees around the map is to do it 5 times for every single tree. It's just not feasible. In my use case, most of the issues mentioned are not issues, as I am never copying from one map to another - only copying tiles I've drawn within a single map; and I never care about copying tiles and objects at the same time. The stamp brush is the only complex piece in that case.

No offense intended (thanks for the years of effort!), but it is sometimes sad to see features put on the back burner because doing them perfectly is difficult; when doing the most basic or imperfect version of the feature is actually 80% of what people want.

saluk commented Mar 24, 2015

I really would like this feature. I have fairly complex trees in my scene, which end up being 4 or 5 layers deep. The only way to copy and paste trees around the map is to do it 5 times for every single tree. It's just not feasible. In my use case, most of the issues mentioned are not issues, as I am never copying from one map to another - only copying tiles I've drawn within a single map; and I never care about copying tiles and objects at the same time. The stamp brush is the only complex piece in that case.

No offense intended (thanks for the years of effort!), but it is sometimes sad to see features put on the back burner because doing them perfectly is difficult; when doing the most basic or imperfect version of the feature is actually 80% of what people want.

@nicloay

This comment has been minimized.

Show comment
Hide comment
@nicloay

nicloay Apr 10, 2015

is this possible to make copy/paste of all layers within one document? in this case should not be any problem. if user removed or add new layer, just show notification that selection in buffer would lost.

nicloay commented Apr 10, 2015

is this possible to make copy/paste of all layers within one document? in this case should not be any problem. if user removed or add new layer, just show notification that selection in buffer would lost.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Apr 10, 2015

Owner

@nicloay While this would avoid some of the issues, it does not make this an easy task since the stamp brush still needs to be adapted to handle multiple layers. It would also introduce a parallel copy/paste system which I'm not too fond of.

In general this is an issue I'd like to address, but I have to choose my priorities somehow. Due to the limited time I've had for Tiled development over the past two years, my priorities have been driven mainly by pull requests and sponsored features. And this feature is something nobody set out to address nor did anybody offer to pay for it. I hope that based on support via Patreon, I will soon be able to spend one full day per week on Tiled which would make time available for working on issues like these.

Owner

bjorn commented Apr 10, 2015

@nicloay While this would avoid some of the issues, it does not make this an easy task since the stamp brush still needs to be adapted to handle multiple layers. It would also introduce a parallel copy/paste system which I'm not too fond of.

In general this is an issue I'd like to address, but I have to choose my priorities somehow. Due to the limited time I've had for Tiled development over the past two years, my priorities have been driven mainly by pull requests and sponsored features. And this feature is something nobody set out to address nor did anybody offer to pay for it. I hope that based on support via Patreon, I will soon be able to spend one full day per week on Tiled which would make time available for working on issues like these.

@ArmagonNo1

This comment has been minimized.

Show comment
Hide comment
@ArmagonNo1

ArmagonNo1 Apr 30, 2015

Just wanted to echo the sentiments of others here. Being able to select multiple layers, dragging out a box and then being able to either move or copy the selection would be so helpful.

ArmagonNo1 commented Apr 30, 2015

Just wanted to echo the sentiments of others here. Being able to select multiple layers, dragging out a box and then being able to either move or copy the selection would be so helpful.

@hamburml

This comment has been minimized.

Show comment
Hide comment
@hamburml

hamburml Mar 12, 2016

This would be extremely helpful when creating automapping rules.

hamburml commented Mar 12, 2016

This would be extremely helpful when creating automapping rules.

@ericmuyser

This comment has been minimized.

Show comment
Hide comment
@ericmuyser

ericmuyser Feb 26, 2017

Pretty much the biggest thing that could be done to improve workflow/quality of maps.

ericmuyser commented Feb 26, 2017

Pretty much the biggest thing that could be done to improve workflow/quality of maps.

@axboureau

This comment has been minimized.

Show comment
Hide comment
@axboureau

axboureau Mar 22, 2017

I also think it would be the greatest improvement to the usability of tiled currently.
Regarding the best way to do it, why not have a button to select from all layers?
Then the copy/paste would not have to be any different (at least from the user point of view).
Then for pasting, there could be 2 ways to handle it:
a) The tiles could be copied with their index and offset to the current layer, and pasting them would paste to the layer given by currentlayer+offset.

b) The tiles would be copied with their index and the layer name, and when pasting each selected tile would be pasted into the layer of the same name at the current location.
If it does not exist (because it is another map), then a layer of the same name is created.

a) is more consistent with the current system
b) is more useful
I think any of the two can work.

axboureau commented Mar 22, 2017

I also think it would be the greatest improvement to the usability of tiled currently.
Regarding the best way to do it, why not have a button to select from all layers?
Then the copy/paste would not have to be any different (at least from the user point of view).
Then for pasting, there could be 2 ways to handle it:
a) The tiles could be copied with their index and offset to the current layer, and pasting them would paste to the layer given by currentlayer+offset.

b) The tiles would be copied with their index and the layer name, and when pasting each selected tile would be pasted into the layer of the same name at the current location.
If it does not exist (because it is another map), then a layer of the same name is created.

a) is more consistent with the current system
b) is more useful
I think any of the two can work.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Jul 24, 2017

Bjorn, how is this coming along? Do we need a bounty to move up the priority (if so, how much is needed given scope of work?). If more than I can pony up, I'll try to organize a pool.

Bobjt commented Jul 24, 2017

Bjorn, how is this coming along? Do we need a bounty to move up the priority (if so, how much is needed given scope of work?). If more than I can pony up, I'll try to organize a pool.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 25, 2017

Owner

@Bobjt Even with spending two full days on Tiled, I'm totally swamped by all kinds of things. I think currently this is mostly because of the Google Summer of Code mentoring, and of course there's the time spent on documentation recently (moving to a more powerful format and to enable translations). Other problems are that major patrons have asked me to spend time on things like loading resources from URLs and soon showing adjacent maps in the same view.

So, of course it's an option to collect up to $200/month, at which point I will promise to commit at least a full day/month to the issue until it is resolved. When things calm down I will eventually get around to it, but I can't promise a timeline.

Scope-wise, I think this feature opens op a big can of worms, so a rough estimate would be 2-4 days of work.

Owner

bjorn commented Jul 25, 2017

@Bobjt Even with spending two full days on Tiled, I'm totally swamped by all kinds of things. I think currently this is mostly because of the Google Summer of Code mentoring, and of course there's the time spent on documentation recently (moving to a more powerful format and to enable translations). Other problems are that major patrons have asked me to spend time on things like loading resources from URLs and soon showing adjacent maps in the same view.

So, of course it's an option to collect up to $200/month, at which point I will promise to commit at least a full day/month to the issue until it is resolved. When things calm down I will eventually get around to it, but I can't promise a timeline.

Scope-wise, I think this feature opens op a big can of worms, so a rough estimate would be 2-4 days of work.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Jul 25, 2017

Thanks for the follow up and I've adjusted contribution. Though not sure how long I can maintain gold level, I rely on Tiled heavily and so there are few hesitations with chipping in commensurate to my investment in my own title. Now worries if it takes a while. I might drop down and come back later to try again depending on finances availability. Either way, I'll be around cheering from the sideline.👍 Keep up the good work.

Bobjt commented Jul 25, 2017

Thanks for the follow up and I've adjusted contribution. Though not sure how long I can maintain gold level, I rely on Tiled heavily and so there are few hesitations with chipping in commensurate to my investment in my own title. Now worries if it takes a while. I might drop down and come back later to try again depending on finances availability. Either way, I'll be around cheering from the sideline.👍 Keep up the good work.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jul 31, 2017

Owner

@Bobjt A major thanks for increasing your support so dramatically! Unfortunately for this month I don't have a day available anymore, but that means I'll be looking for 2 days in August to focus on this issue. I've mentioned this issue in the latest development update. Thanks for the encouragement as well!

Owner

bjorn commented Jul 31, 2017

@Bobjt A major thanks for increasing your support so dramatically! Unfortunately for this month I don't have a day available anymore, but that means I'll be looking for 2 days in August to focus on this issue. I've mentioned this issue in the latest development update. Thanks for the encouragement as well!

@bjorn bjorn added this to Up Next in Roadmap Jul 31, 2017

@bjorn bjorn moved this from Up Next to Future in Roadmap Sep 26, 2017

@bjorn bjorn moved this from Future to In Progress in Roadmap Dec 17, 2017

@bjorn bjorn self-assigned this Dec 17, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Dec 17, 2017

Owner

Started work on this today, but made slow progress so far. There is a new branch wip/multi-layer, where I've enabled multi-selection in the Layers view (5b3b199). In coming days I will see how this will affect various actions, especially painting and selection, but also grouping or moving up/down multiple layers for example.

Owner

bjorn commented Dec 17, 2017

Started work on this today, but made slow progress so far. There is a new branch wip/multi-layer, where I've enabled multi-selection in the Layers view (5b3b199). In coming days I will see how this will affect various actions, especially painting and selection, but also grouping or moving up/down multiple layers for example.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Dec 17, 2017

So excited, Bjørn. While milling away in Tiled as many hours of the day as possible, I've been watching the lists for status. Really looking forward to this one. Cheers!

Bobjt commented Dec 17, 2017

So excited, Bjørn. While milling away in Tiled as many hours of the day as possible, I've been watching the lists for status. Really looking forward to this one. Cheers!

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Dec 17, 2017

Owner

@Bobjt I'm quite excited about improving this area of Tiled myself as well. Thanks again for your support and sorry for the delay in getting to this!

Owner

bjorn commented Dec 17, 2017

@Bobjt I'm quite excited about improving this area of Tiled myself as well. Thanks again for your support and sorry for the delay in getting to this!

bjorn added a commit that referenced this issue Dec 19, 2017

Enable multi-layer editing in the Stamp Brush
* The Stamp Brush now captures from all selected layers on right-click
  drag, creating a multi-layer stamp.
* In case of a multi-layer stamp, a multi-layer preview brush is built.
* The brush preview can now visualize multiple tile layers.
* The paint operation can now handle multiple layers, including to merge
  the undo commands.
* When painting multiple layers, the target layers are matched by name.
  New layers are created when no layers with the given name exist yet.

While this is good progress, it's still only the start since many other
tools as well as many actions should still be adapted to handle
multiple selected layers.

Issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Dec 21, 2017

Owner

I've posted a demonstration based on the above commit on YouTube:

https://www.youtube.com/watch?v=pu-yShBRCqM

Unfortunately I have committed to a few other improvements as well, but I aim to get back to working on this in the next weeks.

Owner

bjorn commented Dec 21, 2017

I've posted a demonstration based on the above commit on YouTube:

https://www.youtube.com/watch?v=pu-yShBRCqM

Unfortunately I have committed to a few other improvements as well, but I aim to get back to working on this in the next weeks.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Dec 21, 2017

It's looking perfect! The application Stamps is natural as well, assuming it's opening the ability for multi-level stamps too (?). I look forward to checking it out!

Bobjt commented Dec 21, 2017

It's looking perfect! The application Stamps is natural as well, assuming it's opening the ability for multi-level stamps too (?). I look forward to checking it out!

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Dec 27, 2017

Owner

It's looking perfect! The application Stamps is natural as well, assuming it's opening the ability for multi-level stamps too (?). I look forward to checking it out!

Yes, in the video I tried to demonstrate that multi-layer stamps can also be saved and restored in the Stamps view. For now you can check it out only by compiling yourself from the wip/multi-layer branch, but I expect to merge this in the development snapshots sometime next week.

Owner

bjorn commented Dec 27, 2017

It's looking perfect! The application Stamps is natural as well, assuming it's opening the ability for multi-level stamps too (?). I look forward to checking it out!

Yes, in the video I tried to demonstrate that multi-layer stamps can also be saved and restored in the Stamps view. For now you can check it out only by compiling yourself from the wip/multi-layer branch, but I expect to merge this in the development snapshots sometime next week.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Jan 1, 2018

Fantastic! Related to this but probably a separate feature, will we have the ability to copy/paste between two different map files as well? (I suppose in its rudimentary form, assuming both maps share the same layer names/structure?) These features couldn't be coming at a better time since I've redone my map format once again and will be rebuilding the final maps from scratch very soon.

Bobjt commented Jan 1, 2018

Fantastic! Related to this but probably a separate feature, will we have the ability to copy/paste between two different map files as well? (I suppose in its rudimentary form, assuming both maps share the same layer names/structure?) These features couldn't be coming at a better time since I've redone my map format once again and will be rebuilding the final maps from scratch very soon.

@ericmuyser

This comment has been minimized.

Show comment
Hide comment
@ericmuyser

ericmuyser Jan 1, 2018

Oh my god. Not to take away from it, but... finally! I'm so excited. Thanks guys!

ericmuyser commented Jan 1, 2018

Oh my god. Not to take away from it, but... finally! I'm so excited. Thanks guys!

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jan 2, 2018

Owner

Fantastic! Related to this but probably a separate feature, will we have the ability to copy/paste between two different map files as well? (I suppose in its rudimentary form, assuming both maps share the same layer names/structure?)

I still have to adjust the copy/paste code, but I don't consider that a separate feature. The way it would currently work, is if you paste multiple layers, they would change the active stamp as usual, and then when you try to paint it will automatically create any layers that it can't find. Layers are matched by name, so it depends on those being unique. I hope this will be fine, but feel free to suggest alternative behaviors / options.

Oh my god. Not to take away from it, but... finally! I'm so excited. Thanks guys!

I definitely share your sentiment!

Owner

bjorn commented Jan 2, 2018

Fantastic! Related to this but probably a separate feature, will we have the ability to copy/paste between two different map files as well? (I suppose in its rudimentary form, assuming both maps share the same layer names/structure?)

I still have to adjust the copy/paste code, but I don't consider that a separate feature. The way it would currently work, is if you paste multiple layers, they would change the active stamp as usual, and then when you try to paint it will automatically create any layers that it can't find. Layers are matched by name, so it depends on those being unique. I hope this will be fine, but feel free to suggest alternative behaviors / options.

Oh my god. Not to take away from it, but... finally! I'm so excited. Thanks guys!

I definitely share your sentiment!

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Jan 2, 2018

Layers are matched by name, so it depends on those being unique.

No problem. That's one caveat that is easy to work around.

Bobjt commented Jan 2, 2018

Layers are matched by name, so it depends on those being unique.

No problem. That's one caveat that is easy to work around.

bjorn added a commit that referenced this issue Feb 14, 2018

Enable multi-layer editing in the Stamp Brush
* The Stamp Brush now captures from all selected layers on right-click
  drag, creating a multi-layer stamp.
* In case of a multi-layer stamp, a multi-layer preview brush is built.
* The brush preview can now visualize multiple tile layers.
* The paint operation can now handle multiple layers, including to merge
  the undo commands.
* When painting multiple layers, the target layers are matched by name.
  New layers are created when no layers with the given name exist yet.

While this is good progress, it's still only the start since many other
tools as well as many actions should still be adapted to handle
multiple selected layers.

Issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Feb 14, 2018

Owner

After spending another two days on this (mostly adjusting cut, copy, paste and delete), today I've merged the wip/multi-layer branch to master and released a new development snapshot! Let me know if you find any issues or things not working as expected!

Known incomplete stuff:

  • Most actions in the Layers view still only work on one layer.
  • The Bucket Fill and Shape Fill tools are not adjusted yet.
Owner

bjorn commented Feb 14, 2018

After spending another two days on this (mostly adjusting cut, copy, paste and delete), today I've merged the wip/multi-layer branch to master and released a new development snapshot! Let me know if you find any issues or things not working as expected!

Known incomplete stuff:

  • Most actions in the Layers view still only work on one layer.
  • The Bucket Fill and Shape Fill tools are not adjusted yet.
@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Feb 17, 2018

Tried this tonight (macOS snapshot) and it's absolutely perfect! I haven't worked with it yet, but sure passes fundamental tests. I can move around in chunks and, from map to map. It's all very intuitive as well. I'm jumping for joy at this lovely work! Thank you, Bjorn!!! 🙌🍾⭐️🎊

Bobjt commented Feb 17, 2018

Tried this tonight (macOS snapshot) and it's absolutely perfect! I haven't worked with it yet, but sure passes fundamental tests. I can move around in chunks and, from map to map. It's all very intuitive as well. I'm jumping for joy at this lovely work! Thank you, Bjorn!!! 🙌🍾⭐️🎊

@bjorn bjorn added this to the Tiled 1.2 milestone Mar 1, 2018

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Mar 28, 2018

Bjorn, the one issue I found in the 14-2-18 build regards rotation of multiple layers ('y' and 'z' shortcuts). Not all layers in the current stamp appear to get rotated.

Bobjt commented Mar 28, 2018

Bjorn, the one issue I found in the 14-2-18 build regards rotation of multiple layers ('y' and 'z' shortcuts). Not all layers in the current stamp appear to get rotated.

bjorn added a commit that referenced this issue May 31, 2018

Fixed flip and rotate actions for multi-layer stamps
Also made some other things, like random mode and synchronization of
selected tiles in the tileset view, take into account multi-layer tile
stamps.

Issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn May 31, 2018

Owner

@Bobjt Man, that was a tough one that took me a few hours to fix! First I made it easy and fast to iterate the tile layers of a map, which I then used while making sure all layers got flipped (while staying in the right composition). In the meantime I also made some small TileLayer optimizations and fixes and realized I had broken display of tile selection earlier. Let's hope no new issues were introduced!

I think now it's time to start looking at the other things I had already mentioned. If you notice anything else, please let me know!

Owner

bjorn commented May 31, 2018

@Bobjt Man, that was a tough one that took me a few hours to fix! First I made it easy and fast to iterate the tile layers of a map, which I then used while making sure all layers got flipped (while staying in the right composition). In the meantime I also made some small TileLayer optimizations and fixes and realized I had broken display of tile selection earlier. Let's hope no new issues were introduced!

I think now it's time to start looking at the other things I had already mentioned. If you notice anything else, please let me know!

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt May 31, 2018

Jesus, @bjorn you're a regular wizard. BUT, that's why I chose you as my map tools engineer because I already knew that 👹 Hee hee hee. I was relieved to hear that some more patrons chipped in to help cover costs. Of the hold outs I think 1/3 can't afford (shucks), another third are stingy (blast!), and there's this third kind that simply aren't thinking. Anyway, this fix is epic. Rotating layered sections is going to vary map look so rapidly that it's simply monumental. Keep up the good work!

Bobjt commented May 31, 2018

Jesus, @bjorn you're a regular wizard. BUT, that's why I chose you as my map tools engineer because I already knew that 👹 Hee hee hee. I was relieved to hear that some more patrons chipped in to help cover costs. Of the hold outs I think 1/3 can't afford (shucks), another third are stingy (blast!), and there's this third kind that simply aren't thinking. Anyway, this fix is epic. Rotating layered sections is going to vary map look so rapidly that it's simply monumental. Keep up the good work!

bjorn added a commit that referenced this issue Jun 6, 2018

Made filling tools work with multi-layer stamps
This applies to both the Bucket Fill Tool as well as the Shape Fill
Tool.

Also applied similar logic regarding working on hidden layers as done in
change c87f8c4 for the Stamp Brush.

Issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 6, 2018

Owner

@Bobjt Well, I'm not sure if a wizard would make so many mistakes to the same small class, but today I did get multi-layer stamps to play nicely with the fill tools, while reducing code size. ^^

Owner

bjorn commented Jun 6, 2018

@Bobjt Well, I'm not sure if a wizard would make so many mistakes to the same small class, but today I did get multi-layer stamps to play nicely with the fill tools, while reducing code size. ^^

bjorn added a commit that referenced this issue Jul 30, 2018

bjorn added a commit that referenced this issue Jul 31, 2018

bjorn added a commit that referenced this issue Jul 31, 2018

bjorn added a commit that referenced this issue Aug 2, 2018

Some fixes related to multi-layer selection
* Fixed a potential crash after deleting a group layer. This happened due
  to the QGraphicsRectItem staying parented to its last LayerItem when
  hidden, and then getting deleted along with that layer item when the
  layer was removed.

* Made sure the new current layer is selected after removing the
  selected layers.

* Made sure layers are selected by row.

Part of issue #282

bjorn added a commit that referenced this issue Aug 2, 2018

bjorn added a commit that referenced this issue Aug 2, 2018

bjorn added a commit that referenced this issue Aug 5, 2018

Made "Show/Hide Lock/Unlock Other Layers" work with multi-selection
These actions now show/hide or lock/unlock all layers not included in
the current selection, instead of only taking into account the current
layer.

Part of issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Aug 7, 2018

Owner

Ah, the long tail of adding certain features to an existing project! All above changes are included in today's new development snapshot.

Still areas that could use improvement:

  • Make "Merge Layer Down" work with multiple selected layers. Should not be that hard, just need to make sure to process selected layers in the right order.

  • Make the "Offset Layer" tool apply the offset to all selected layers. Here we mostly need to avoid moving a layer along with any of its parent layers, since that would apply the offset twice.

Owner

bjorn commented Aug 7, 2018

Ah, the long tail of adding certain features to an existing project! All above changes are included in today's new development snapshot.

Still areas that could use improvement:

  • Make "Merge Layer Down" work with multiple selected layers. Should not be that hard, just need to make sure to process selected layers in the right order.

  • Make the "Offset Layer" tool apply the offset to all selected layers. Here we mostly need to avoid moving a layer along with any of its parent layers, since that would apply the offset twice.

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Aug 7, 2018

Holy, wow, that's a lot of change propagation. But believe me, I'm the first guy to understand... No one should ever see the map editor I created, now retired. It's got more bugs than Pfizer has pills, and I'm flat-out ashamed of the UI - it's a disgrace...I look up to you massively my friend!

Bobjt commented Aug 7, 2018

Holy, wow, that's a lot of change propagation. But believe me, I'm the first guy to understand... No one should ever see the map editor I created, now retired. It's got more bugs than Pfizer has pills, and I'm flat-out ashamed of the UI - it's a disgrace...I look up to you massively my friend!

bjorn added a commit that referenced this issue Sep 5, 2018

Properties view now applies changes to all selected layers
When having multiple layers selected, changing properties like the
visibility or locked status now apply to all selected layers instead of
just the last selected one.

The same goes for custom properties, which are also aggregated based on
all selected layers, as was already implemented for objects.

Part of issue #282

bjorn added a commit that referenced this issue Sep 5, 2018

Made "Merge Layer Down" work on all selected layers
Skipping those that can't be merged down.

Part of issue #282

bjorn added a commit that referenced this issue Sep 5, 2018

Made "Offset Layers" tool work on all selected layers
The tool makes sure that when a parent layer is moved, its children are
not moved as well, to avoid applying the offset twice.

Also made some other improvements, to reduce the chance of accidental
use:

* Only drag on left mouse button, not on right mouse button.
* Show a "SizeAll" / hand cursor when pressing the mouse button.
* While dragging, allow right mouse button or Escape to abort the drag.

Also fixed a problem with updating a layer's opacity when "Highlight
current layer" is active and multiple layers are selected.

Part of issue #282
@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Sep 5, 2018

Owner

Alright, now the "Merge Layer Down" action and "Offset Layer" tool also work on all selected layers. In addition, the Properties view now behaves more like you would expect when having multiple layers selected, applying changes to layer attributes and custom properties to all of them.

At the moment I'm not aware of more areas that need adjustment to multi-selection for layers, so I'm closing this issue!

Owner

bjorn commented Sep 5, 2018

Alright, now the "Merge Layer Down" action and "Offset Layer" tool also work on all selected layers. In addition, the Properties view now behaves more like you would expect when having multiple layers selected, applying changes to layer attributes and custom properties to all of them.

At the moment I'm not aware of more areas that need adjustment to multi-selection for layers, so I'm closing this issue!

@bjorn bjorn closed this Sep 5, 2018

Roadmap automation moved this from In Progress to Recently Completed Sep 5, 2018

@Bobjt

This comment has been minimized.

Show comment
Hide comment
@Bobjt

Bobjt Sep 5, 2018

One small step for Tiled, one giant leap for indie development. 🚀

Bobjt commented Sep 5, 2018

One small step for Tiled, one giant leap for indie development. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment