• Editor
  • Spine CLI Export Option for specific skeleton

Sekomu Thank you for reporting the problem! I will check if I can reproduce it, but it seems that the version of Spine launcher you are using is quite old, so we would appreciate it if you could update it to the latest launcher for now. To update the launcher, install the latest installer from the Spine licensing page and reinstall Spine.

Related Discussions
...

Sekomu I checked and it seems to be due to the incorrect order of properties in the .export.json file: "all": true should be under "version": and above "output":. As long as I rearranged them in the correct order and ran the export, it worked fine. The full contents of the .export.json file are as follows:

{
"class": "export-json",
"extension": ".json",
"format": "JSON",
"prettyPrint": true,
"nonessential": true,
"cleanUp": false,
"packAtlas": null,
"packSource": "attachments",
"packTarget": "single",
"warnings": true,
"version": null,
"all": true,
"output": "",
"id": -1,
"input": "",
"open": false
}
  • Düzenlendi

Sekomu By the way, the video you attached had your Spine license information on it, so I removed it to protect your license information.

As for the suggestion to add "all":true even in the binary format, I have created an issue ticket here:
EsotericSoftware/spine-editor812
You can subscribe to this issue ticket to receive notifications when there is any progress on this issue.

    Misaki
    I updated the Launcher and corrected the order of the JSON file, but the export still did not work.
    The previously attached Test.spine file was saved with the Export✅ setting enabled, so I am attaching the file again. I believe this attachment will help reproduce the issue.

    spine2.zip
    944B

    without Export✅ in Test.spine

    C:\Workspace\Spine>spine -i Test.spine -o . -e exportAsJson.json
    Spine Launcher 4.2.17
    Esoteric Software LLC (C) 2013-2024 | http://esotericsoftware.com
    Windows 10 Pro amd64 10.0
    Starting: Spine 4.2.33 Enterprise
    Spine 4.2.33 Enterprise
    Licensed to: <removed>
    JSON export: Test
    Complete.

    with Export✅ in Test.spine

    C:\Workspace\Spine>spine -i Test.spine -o . -e exportAsJson.json
    Spine Launcher 4.2.17
    Esoteric Software LLC (C) 2013-2024 | http://esotericsoftware.com
    Windows 10 Pro amd64 10.0
    Starting: Spine 4.2.33 Enterprise
    Spine 4.2.33 Enterprise
    Licensed to: <removed>
    JSON export: Test
    Images path not found: ./images [skeleton2]
    Images path not found: ./images [skeleton1]
    Complete.

    and...
    Thank you for removing my personal information. You saved my life.🙇‍♂️

      Sekomu Indeed, I was able to reproduce the problem with the Spine project you sent me. I am sorry that the order in the JSON file did not seem to be a problem! I'll create an issue ticket to fix this.

        Misaki Thank you so much for taking the time and effort to verify it, Misaki!

          Sekomu I have not created an issue ticket, but wanted to let you know that Nate is already working on this issue. I will let you know when the fix is complete!

          bir ay sonra

          Sekomu Sorry for the wait on this issue. In the recent release of Spine 4.2.34, the parameter --export-all is now available, which allows you to export all skeletons, whether you want to export them in JSON or binary format. (Please ignore that I previously told you that this can be set in the export settings JSON file, just add this parameter.)

          3 ay sonra

          Spinebot
          I'm not seeing a --skeleton command line option

            stupot Your point is correct, sorry I missed Spinebot's incorrect response! The command line option --skeleton does not exist, edited Spinebot's answer.

              Misaki that option would still be good though, thats how I ended up here, looking for a way to target specific skeletons for export easily. Specifying a skeleton to override default behaviour would be great, specifying a list of skeletons even better (or multiple --skeleton). Whats mentioned in the above solution, to export and edit etc, although appreciated, is more of an impractical workaround than a realistic solution.

                stupot Hmm, when I read your suggestion, I thought for a moment that we might consider adding a way to specify the export target skeleton via the CLI, but I can't think of many cases where that would be very useful. In Spine, whether exporting via the CLI or not, you cannot specify the target skeleton when exporting skeletons in JSON or binary format unless you uncheck the skeleton you want to exclude from the export. In many cases, exporting skeleton data is very fast, even if there are many skeletons in a single project, so re-exporting even unrelated skeletons should not be a big problem.

                When exporting animations in image or video format, you can specify the target skeleton in the export configuration JSON file. I wonder if what you are referring to is the hassle of editing the export settings JSON file to export a specific skeleton when exporting in image or video format.
                I would appreciate more details about your current workflow, preferably in a new thread.

                  Misaki Hi, it would be very handy for me if a single skeleton could be exported from a spine containing many skeletons, without any editing or unchecking exports.

                  In my use case, a spine could have many skeletons, each exporting with multiple variants, which then triggers creation of multiple image formats. So that generates a lot of image files (some quite big) and avif's aren't quick to generate. So for just one small source edit, this would generate a lengthy asset creation which would also hammer the source control for a lot of files that haven't really changed.

                    stupot Thanks for the additional clarification! As expected, this seems to be a fairly complex case, but I thought it might be worth considering and have created an issue ticket for it:
                    EsotericSoftware/spine-editor854
                    You can subscribe to this issue ticket to receive notifications when there is any progress on this issue.