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 color doesn't show on Objects because of by-default object type color #1448

Closed
Riva3000 opened this Issue Feb 17, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@Riva3000

Riva3000 commented Feb 17, 2017

There is Layer Color param that shows all Objects in that layer colored.
There are also Object Types and Color setting for object type.
Object Type color overrides Layer color.

Now every Object seem to have a default empty? type.
Also Object Types settings are not per .tmx. They carry over to any map.

Now what I did was create a map with several colored object layers full of objects.
Than I probably by accident created new Object Type and gave it empty string name.
That Type than maped to every Object with no (empty) type.
Suddenly for every map I opened all objects showed with default gray color dispite their Layer color settings.
tied editor layer colors issue
The accidentaly created Object Type with empty Type name mapped to every object and overriden the color.

Seemd like a bug and took me a while to figure out.

At least the part that Object Type with empty string name maps to all Objects with no type seem like a bug though.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Feb 17, 2017

Owner

You're right that it's a little unexpected, though it could also be used as a feature so I'm not in a rush to "fix" this. I think it's rare to run into this, so possibly for every person being confused by it there is somebody else actually relying on this behavior.

It may be that it makes sense to change this behavior as part of implementing #1410.

Owner

bjorn commented Feb 17, 2017

You're right that it's a little unexpected, though it could also be used as a feature so I'm not in a rush to "fix" this. I think it's rare to run into this, so possibly for every person being confused by it there is somebody else actually relying on this behavior.

It may be that it makes sense to change this behavior as part of implementing #1410.

@Riva3000

This comment has been minimized.

Show comment
Hide comment
@Riva3000

Riva3000 Feb 18, 2017

Understood.

The most cofusing part is that if I just create a new Object Type (in Object types editor) and NOT touch its name field (leaving it null I guess ?) it doesn't map to Objects with no type.
But if I click into the Object Type name field there, enter nothing, and press enter, it probably assigns an empty string ? there and suddenly it maps to the Objects. And the Object Type name field looks empty as before, no indication for user of that.

Maybe if you can at some point add some indication there and better yet also replace the Type field's value in Object properties with something like "default type" instead of just empty field.
Would make things a lot clearer imho.

Riva3000 commented Feb 18, 2017

Understood.

The most cofusing part is that if I just create a new Object Type (in Object types editor) and NOT touch its name field (leaving it null I guess ?) it doesn't map to Objects with no type.
But if I click into the Object Type name field there, enter nothing, and press enter, it probably assigns an empty string ? there and suddenly it maps to the Objects. And the Object Type name field looks empty as before, no indication for user of that.

Maybe if you can at some point add some indication there and better yet also replace the Type field's value in Object properties with something like "default type" instead of just empty field.
Would make things a lot clearer imho.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Feb 20, 2017

Owner

The most cofusing part is that if I just create a new Object Type (in Object types editor) and NOT touch its name field (leaving it null I guess ?) it doesn't map to Objects with no type.

Hmm, that is more like a bug. There is no difference between an unset type and an empty type, so what is missing here is mostly some update handling.

Owner

bjorn commented Feb 20, 2017

The most cofusing part is that if I just create a new Object Type (in Object types editor) and NOT touch its name field (leaving it null I guess ?) it doesn't map to Objects with no type.

Hmm, that is more like a bug. There is no difference between an unset type and an empty type, so what is missing here is mostly some update handling.

@bjorn bjorn closed this in 02ba8cd Feb 20, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Feb 20, 2017

Owner

So change 02ba8cd should at least fix that most confusing part. It's a small change that'll be included along some other fixes with Tiled 0.18.2.

Owner

bjorn commented Feb 20, 2017

So change 02ba8cd should at least fix that most confusing part. It's a small change that'll be included along some other fixes with Tiled 0.18.2.

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