MmmMaarten Posted October 24, 2023 Share Posted October 24, 2023 When chosing SVG the Spine JSON files generated by Affinity are corrupt. [edit] When chosing JPG the Spine JSON file will not even be created (see next post)! TLDR; When chosing to export SVG-files the Spine JSON batch exporter doesn't work as supposed to; no x, y, width and height values are written for the assets to the json. This not only makes the Spine JSON corrupt, but even as a plain JSON it is now corrupt as format and so can't be read by JSON parsers. I understand the Spine editor itself cannot handle SVG files (yet), but other applications using the format can, so there is no reason to limit this output to raster only. Also I recently published an importer script for Moho animation software which uses this Spine JSON output to automatically import assets from Affinity into Moho via the Spine JSON Format. I am working on support for vectorgraphics too in order to import vector graphics from Affinity into Moho with the script, but because of this issue that currently isn't possible unfortunately. All measurement data luckily is already known by the Affinity software, so could this please get a fix? That would be awesome! Thanks in advance! Quote Link to comment Share on other sites More sharing options...
MmmMaarten Posted October 24, 2023 Author Share Posted October 24, 2023 To add to the above; when chosing JPG the Spine JSON file isn't even created!! TLDR; To add to the above; I just tried the same, but now with JPG. To my big surprise when chosing the 'Single JPEG (High Quality)' export preset, Affinity doesn't even write the Spine json file... But JPEG files are without a doubt supported by Spine and also here I don't see any reason why this shouldn't output a spine json file when the Spine JSON is chosen in the Batch Builder dropdown. Quote Link to comment Share on other sites More sharing options...
Dan C Posted November 4, 2023 Share Posted November 4, 2023 Hi MmmMaarten, I've not been able to recreate this, could you possibly supply a file and full recipe to recreate this issue? Lee Quote Link to comment Share on other sites More sharing options...
MmmMaarten Posted November 5, 2023 Author Share Posted November 5, 2023 On 11/4/2023 at 3:53 PM, Lee_T said: Hi MmmMaarten, I've not been able to recreate this, could you possibly supply a file and full recipe to recreate this issue? Lee It's very straight forward and always reproducable here, so you must have done something differently. There's nothing special about the files and the results are always the same. I just found that also when picking the default SVG exports in the slice-exports it sometimes not even generate the Spine JSON file, while after some clicking around without changing anything suddenly that works. Feels totally unpredictable and unstable tbh. I also reported months ago already that spine JSON files aren't updated when things change and you export again. That's also an issue here. But with my own svg preset it seems to create the spine JSON the first time, but creates a corrupt one; as seen in the video. For the rest it's easy to reproduce the other scenarios too, as written about above. export-spine-issue-small-2.mp4 Quote Link to comment Share on other sites More sharing options...
MmmMaarten Posted November 22, 2023 Author Share Posted November 22, 2023 @Lee_T It's been almost three weeks since I posted a response to your question. Any news on fixing this? Quote Link to comment Share on other sites More sharing options...
Dan C Posted November 23, 2023 Share Posted November 23, 2023 Hi MmmMaarten, Apologies for not getting back to you sooner, I'm still looking into this and will get back to you as soon as I have any information for you. Lee Quote Link to comment Share on other sites More sharing options...
Ezbaze Posted November 24, 2023 Share Posted November 24, 2023 Spine.jsonuntitled.afdesign I was able to reproduce the issue, I included both the af file and the JSON file Another issue is that the Spine.json gets overridden when exporting a different file, with 0 warnings that it's going to do that. + For some reason the dropdown stays selected for every single document. MmmMaarten 1 Quote Link to comment Share on other sites More sharing options...
Hangman Posted November 24, 2023 Share Posted November 24, 2023 On 10/24/2023 at 5:20 PM, MmmMaarten said: To add to the above; I just tried the same, but now with JPG. To my big surprise when chosing the 'Single JPEG (High Quality)' export preset, Affinity doesn't even write the Spine json file... FWIW, certainly the same issue when creating Spine JSON files for SVG on macOS but no issues writing the Spine JSON file for JPEG files or with the Spine JSON files being updated when things change and you export again... Quote Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse Link to comment Share on other sites More sharing options...
Ezbaze Posted November 24, 2023 Share Posted November 24, 2023 12 minutes ago, Hangman said: files being updated when things change and you export again Make a dir with just a Spine.json file and then export a file/spine into that dir It will ignore the previous Spine.json and just export the first time, but then it will ask you the second time because the other file exists Quote Link to comment Share on other sites More sharing options...
Hangman Posted November 24, 2023 Share Posted November 24, 2023 11 minutes ago, Ezbaze said: Make a dir with just a Spine.json file and then export a file/spine into that dir It will ignore the previous Spine.json and just export the first time, but then it will ask you the second time because the other file exists I see what you mean, it overwrites the original Spine JSON file on the first export without asking but then asks on the second attempt... not good... Quote Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse Link to comment Share on other sites More sharing options...
Ezbaze Posted November 24, 2023 Share Posted November 24, 2023 14 minutes ago, Hangman said: I see what you mean, it overwrites the original Spine JSON file on the first export without asking but then asks on the second attempt... not good... Indeed, especially as the file could be completely unrelated Quote Link to comment Share on other sites More sharing options...
Hangman Posted November 24, 2023 Share Posted November 24, 2023 1 minute ago, Ezbaze said: Indeed, especially as the file could be completely unrelated Exactly... Quote Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 MacBook Pro M3 Max, 36 GB Unified Memory, macOS Sonoma 14.6.1, Magic Mouse HP ENVY x360, 8 GB RAM, AMD Ryzen 5 2500U, Windows 10 Home, Logitech Mouse Link to comment Share on other sites More sharing options...
MmmMaarten Posted December 11, 2023 Author Share Posted December 11, 2023 On 11/23/2023 at 2:08 PM, Lee_T said: Hi MmmMaarten, Apologies for not getting back to you sooner, I'm still looking into this and will get back to you as soon as I have any information for you. Lee It's around three weeks later now, any news? Quote Link to comment Share on other sites More sharing options...
Dan C Posted December 11, 2023 Share Posted December 11, 2023 Hi MmmMaarten, I've logged this as a bug for the devs to look into. Lee MmmMaarten 1 Quote Link to comment Share on other sites More sharing options...
MmmMaarten Posted December 11, 2023 Author Share Posted December 11, 2023 22 minutes ago, Lee_T said: Hi MmmMaarten, I've logged this as a bug for the devs to look into. Lee Thanks Lee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.