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
Fix skin json structure #13
Conversation
Thanks for the PR. We left the script using the old JSON format (and the Spine editor continues to be able to import a limited version of the old JSON format) because some people have written tools for that format. Changing the script would have disrupted people's work. I think it has been long enough that we can have the script output JSON that matches the JSON exported from the latest editor. I wonder if we should leave the option to export the old format, eg a |
Hello, |
to be able to use the old formating if needed
Should be ok now, I also add the option in the UI. |
Please add the option to enable the old json format in the visual settings of the script, because opening a file and rewriting the value every time is very inconvenient |
@NathanSweet can you had the legacyJson option in the GUI (as @Valmond257 suggest) like in my commit with the legacyjsonCheckbox : 8ae882d#:~:text=settings.legacyjson%20%3D%20legacyjsonCheckbox.value%3B Thanks in advance. |
@Valmond257 Can you please explain the reason for needing the script to output the older format? |
@NathanSweet My company is running Spine version 3.7.87 because newer versions have issues with the game engine we're working with. And in this version of Spine, when trying to export the new .json format, it gives an error, so you have to manually change the variable in the script code every update. |
Thanks. We don't want to add settings for everything we could add settings for. That quickly turns the UI into overwhelming spaceship controls. I think it would be better to reverse the logic, so the script outputs the legacy JSON that any version of Spine can consume. Most users don't care what the JSON looks like. If you want the latest JSON format because you do care, probably because you process the JSON with other tools, then you can set a variable in the code. |
I don't really agree with this logic because for compatibility reasons, if you decide to stay at the lower version of spine (3.7 in this example), you also need to lock the version of the PhotoshopToSpine script. Because any change in the spine code in a future version may impact the PhotoshopToSpine script and invalidate the fact that the newer version of the PhotoshopToSpine script work with the older version of the spine. for example, if a feature is added in a future version of spine 5.(...) and requires a modification of the PhotoshopToSpine script that renamed some elements in the json structure which is not compatible with an old version of spine. In this case, the only choice you have is to lock your version of PhotoshopToSpine script too. I think it makes more sense to update the PhotoshopToSpine script accordingly to the current version of the spine engine. Because otherwise impossible for me to setup a pipe that automatically updates the photoshop script in relation with the update of the spine engine. |
If we continue to output the old format, then most users don't need to do anything. If we change to the newer format, people using Spine < 4.0 will have trouble and we'll have to provide customer support to get them past the issue. Once the JSON format of newer Spine version changes in such a way that the PS script needs to output JSON that is incompatible with older versions of the Spine editor, then we can make the PS script output the newer format. Until then, outputting the newer format just doesn't benefit most users. The only people who care are those who are processing the JSON data themselves and want to use the newer format. I have a feeling that is a very small group of people. Update the PS script is easy, even if needing to change a variable in the code. I don't suggest automating the update of ANY dependency, that's just asking for things to break. |
I finally Fix this issue because it is a huge pain to make my tools usable by both formats:
http://fr.esotericsoftware.com/forum/photoshopToSpine-Two-json-structures-to-handle-16641