-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Comments
I fully agree Tiled needs this feature, but I'm unsure how to best implement it. Problem areas:
|
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. |
(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:
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 $ |
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 :) |
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. |
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. |
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 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. |
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. |
This would be extremely helpful when creating automapping rules. |
Pretty much the biggest thing that could be done to improve workflow/quality of maps. |
I also think it would be the greatest improvement to the usability of tiled currently. 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. a) is more consistent with the current system |
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 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. |
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 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! |
Started work on this today, but made slow progress so far. There is a new branch |
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 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! |
* 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
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. |
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 |
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. |
Oh my god. Not to take away from it, but... finally! I'm so excited. Thanks guys! |
No problem. That's one caveat that is easy to work around. |
* 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
After spending another two days on this (mostly adjusting cut, copy, paste and delete), today I've merged the Known incomplete stuff:
|
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, 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. |
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
@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! |
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 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. ^^ |
* 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
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
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:
|
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! |
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
Skipping those that can't be merged down. Part of issue #282
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
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! |
One small step for Tiled, one giant leap for indie development. ✨🚀 |
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 ;)
The text was updated successfully, but these errors were encountered: