• Editor
  • Spine CLI convert 4.1 -> 4.2 problem

The result of CLI conversion of json file is wrong if bone parent rotation (probably scale\reflection as well) is disabled (inherit flag is unchecked).
Spine -i input.json -o output.spinejson -e json

Related Discussions
...

Spinebot Saving export settings for later use in CLI doesn't help with this issue.

    Ktulhu We are sorry to hear that you are experiencing problems. Could you please send us skeleton data via email that can reproduce the problem so that we can investigate it further?: contact@esotericsoftware.com
    Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

    Ktulhu Thank you for sending us the files to reproduce the problem! I have been able to reproduce the problem you describe. It seems that if the input is a Spine project created with 4.1, the output is fine, but if the input is exported skeleton data (JSON file), the rotation of the bones is incorrect with rotation inheritance disabled, as you mentioned. Spinebot's answer was confusing and has been removed. I will look further into the conditions of this problem and then create an issue ticket to fix it.

    • تم التحرير

    Ktulhu Sorry, my previous answer was based on a misunderstanding. Importing skeleton data files exported in 4.1 into 4.2 is not supported (whether via CLI or the UI). It just happens that JSON files exported from 4.1 can be imported into 4.2. To properly upgrade from 4.1 to 4.2, you must open the Spine project created in 4.1 and export it again using Spine 4.2.

    In your case, it seems that you have the Spine project created in 4.1, so simply specify that project in the input path.
    If the project file is unavailable and you only have a .json file, you can follow these steps:

    1. Run a CLI command to open the 4.1 JSON file and create a Spine project file:
      Spine -i <path to the .json file> -o <path to save the .spine file>
    2. The import command -r was required, so it should be Spine -i <path to the .json file> -o <path to save the .spine file> -r
    3. Use Spine 4.2 to export the project file to JSON:
      Spine -i <path to the saved .spine file> -o output.spinejson -e json

    I have hundreds of 4.1 json files in a game project and need a quick way to convert them into 4.2
    So I have to complete 2 steps: json-> spine, spine->json, correct?

    A bit strange, as json -> json works fine except the situation described.

    Unfortunately the first command you suggested returns "ERROR: Input and output specified without specifying an action." So probably it should be Spine -i <path to the .json file> -o <path to save the .spine file> -r ?

    And the result of the second command is the same incorrect one.

      Ktulhu Sorry, I accidentally deleted the import command. The final -r is necessary!

      And the result of the second command is the same incorrect one.

      Are the respective versions correct? Perhaps I should have mentioned the -u command. The import of the .json file must be done in Spine 4.1 and the subsequent export in 4.2. Does it not work when you run the command like the following?
      Spine -u 4.1.xx -i <path to the .json file> -o <path to save the .spine file> -r
      Spine -u 4.2.xx -i <path to the saved .spine file> -o output.spinejson -e json

      Ok, with -u flag it's working, thanks!

        Ktulhu Glad to hear it works! Thanks for getting back to us!