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

JSON export changed behaviour in 1.11.0 #4041

Open
smjnab opened this issue Aug 22, 2024 · 4 comments
Open

JSON export changed behaviour in 1.11.0 #4041

smjnab opened this issue Aug 22, 2024 · 4 comments
Labels
bug Broken behavior.

Comments

@smjnab
Copy link

smjnab commented Aug 22, 2024

In 1.11.0 when exporting to JSON all properties are included in the export. Previously only those with a modified value would be included. Not sure if this is intended or by mistake. In my case it creates issues as objects have values now that normally would be undefined and get their default values for specific cases.

An easy example would be that I use the layer tint to set the tint of all objects in that layer, unless an object have a value in the gfx class with a color property. This no longer works as all objects in a layer will have a #ffffff value etc.

json_diff
JSON diff for export in 1.11.0 compared to old behaviour.

Expected behavior
If intended, a feature request instead to have option in export settings for old behaviour.

Specifications:

  • OS: Linux (KDE Neon)
  • Tiled Version: 1.11.0
@smjnab smjnab added the bug Broken behavior. label Aug 22, 2024
@dogboydog
Copy link
Contributor

Can you confirm that in Edit > Preferences > General, you have 'Resolve object types and properties' off?

@bjorn
Copy link
Member

bjorn commented Aug 23, 2024

This definitely sounds like a side-effect of fixing #3411. Do you actually need types and top-level properties to be resolved but not class members? If not you can disable the export option as @dogboydog suggested.

@smjnab
Copy link
Author

smjnab commented Aug 23, 2024

Ah, yes the 'Resolve object types and properties' has changed its behaviour. I needed it to be on, as with the old behaviour I would get the top-level stuff.

For example: If turning it off, all predefined objects placed in an object layer now have an empty Class (type in export) field as their value is grey from the default setting.

If this is a difficult fix and I'm the only one that dug this hole for myself, then I can definetly stay with the previous Tiled version. I'm more than 50% into the project so don't need any more features :)

@bjorn
Copy link
Member

bjorn commented Aug 23, 2024

If this is a difficult fix and I'm the only one that dug this hole for myself, then I can definetly stay with the previous Tiled version. I'm more than 50% into the project so don't need any more features :)

Well, you might not be the only person in this situation. The option to resolve class members could be separated from the existing option, I just hoped this wouldn't be necessary.

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

No branches or pull requests

3 participants