Skip to content

Object selection/movement disregards object layer #354

Open
nickgravelyn opened this Issue Feb 10, 2013 · 6 comments

3 participants

@nickgravelyn

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

@nickgravelyn

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

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
Owner
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

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.

@nickgravelyn

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.