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

Object selection/movement disregards object layer #354

Closed
ghost opened this issue Feb 10, 2013 · 9 comments · Fixed by #2865
Closed

Object selection/movement disregards object layer #354

ghost opened this issue Feb 10, 2013 · 9 comments · Fixed by #2865
Milestone

Comments

@ghost
Copy link

ghost commented Feb 10, 2013

I have two object layers in my maps, one for my "entities" (player, baddies, etc) and one for metadata regions. Objects on these two layers can overlap but this causes issues as Tiled doesn't properly filter objects by layer for selection and movement. So if I have my Entity layer selected I can still select and move objects on the Metadata layer. This makes it really hard for me to edit my maps since I frequently have metadata regions that overlap entity objects.

@bjorn
Copy link
Member

bjorn commented Feb 10, 2013

Yeah, I considered that it should actually only work on the objects of the currently selected layer. However, on the other hand if you had related objects on different layers you would most certainly still want to be able to move them around together. So I'm not quite sure how to cover both use-cases. Suggestions welcome here.

In your situation, consider for now to hide the object layers that you do not want to edit.

@ghost
Copy link
Author

ghost commented Feb 10, 2013

Personally I think it makes sense to only interact with objects on the selected layer. It's consistent with the tile layers (you can't modify contents of unselected layers) and it makes it easier to work with object layers with overlapping regions.

A potential solution is to allow multiple selected object layers (not sure how to handle multiple selected tile layers). So you can only interact with items on the selected layer but if you select multiple object layers you can drag to select a group from any of the selected layers and move them around. Seems a middle ground solution, though I can't seem to think how multiple selection of tile layers would work (or even if it could work).

@gamedevsam
Copy link

Well, multiple selection is already possible in the "Objects" tab. What if we only allow selection / manipulation of objects from the current "selected" layer, but in the "Objects" tab you can select multiple layers, since they're all object layers and you don't have to worry about "Object" or "Tile" modes.

@bjorn
Copy link
Member

bjorn commented Feb 11, 2013

The only reason you can select multiple layers in the Objects view is because Tiled supports multi-selection of objects. That you can use the same view to also select multiple object layers is a side-effect and does not actually result in multiple layers being selected.

I don't really like the idea of having to multi-select a bunch of layers in order to then edit any objects that are part of those layers. I checked out how Inkscape handles object selection in relation to layers, and I think it gives a better example. You can interact with all objects regardless of the current layer, but it allows you to lock layers in which case they can no longer be interacted with but are still visible.

@gamedevsam
Copy link

Of course! Locking layers makes a lot of sense, and it should be relatively simple to implement, since it only requires one new UI component in the Layers / Objects view.

@ghost
Copy link
Author

ghost commented Feb 12, 2013

Locking would be a decent compromise. I presume it'd make sense to just add it to all layers so that tile layers can also be locked from editing?

@JoeCreates
Copy link

Just noting that this seems to be implemented and can probably be closed? @bjorn

@bjorn
Copy link
Member

bjorn commented Jul 23, 2019

@JoeCreates Yeah, at least layer locking has been implemented in the meantime. But there is no option to limit object interaction to those of the selected layer(s), which I guess would still make sense? Essentially I'd like to introduce a companion option to "highlight current layers", which would automatically consider any non-selected layers as locked.

@JoeCreates
Copy link

Ah that would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants