fceek

Hi,

I've been working on a game project with about 300ish spine files, recently planning to upgrade all of them from 3.8 to 4.0.

However, in early stage of the project we didn't establish a standard for directory structure so the spine project files and their exported unity runtime files are placed in a totally different manner. Since change their export directory would break all references in Unity I have to make them export their 4.0 version to where they used to be.

I can see everyone of the spine projects holds their export destination in their export settings, but is there a way to retrieve them through spine cli? So that I can make the automation workflow read where they want to be exported to then export their 4.0 version there.

Thank you.

---

If I don't specify an output path by -o <some path>, they got exported to the same directory where the .spine file locates, is that an expected behaviour? Thought that would export them according to their own config.
fceek
  • Postovi: 3

Nate

Currently when exporting JSON or binary without an output path specified by -o, --output, or in the export settings JSON, Spine uses the input path. So yes, that is expected.

I found a bug: Spine uses the input path for output but the input path is usually a project file, so it tries to export to eg /abc/project.spine/skeleton.json. We'll fix this to use the parent folder when the input path is a project file.

Anyway, using the output path stored in the project instead of the input path might be surprising to change at this point. Some users may rely on that behavior. Also, the output path stored in the project is whatever was used the last time an export was done using the Spine editor UI, so you'd not want to rely on it being the right path for CLI export. I do understand you just want to extract that path, I'm only explaining why we don't use it when no output path is specified.

The project stores the last used paths for every export type but there's not a way to retrieve them, sorry!

We have spine -i project.spine to dump information about the project, but we don't dump the export paths/settings as it would be a lot for the ~10 export types. I suppose we could output only the output path for the last used export. We've done that in 4.1.10-beta. It works like this:
spine -u 4.1.10-beta -i /your/project.spine
And the output is like:
Project info: /your/project.spine
Spine version: 4.1.10-beta
Dopesheet FPS: 30
Last export output: /path/to/last/export/dir
Skeleton: spineboy-pro
Size: 703.71 x 838.14
Bones (67): root, hip, crosshair, aim-constraint-target, rear-foot-target, rear-leg-target, rear-thigh, rear-shin, rear-foot, back-foot-tip, board-ik, clipping, hoverboard-controller, exhaust1, exhaust2, exhaust3, portal-root, flare1, flare10, flare2, flare3, flare4, flare5, flare6, flare7, flare8, flare9, torso, torso2, torso3, front-shoulder, front-upper-arm, front-bracer, front-fist, front-foot-target, front-leg-target, front-thigh, front-shin, front-foot, front-foot-tip, back-shoulder, rear-upper-arm, rear-bracer, gun, gun-tip, neck, head, hair1, hair2, hair3, hair4, hoverboard-thruster-front, hoverboard-thruster-rear, hoverglow-front, hoverglow-rear, muzzle, muzzle-ring, muzzle-ring2, muzzle-ring3, muzzle-ring4, portal, portal-shade, portal-streaks1, portal-streaks2, side-glow1, side-glow2, head-control
Slots (52): portal-bg, portal-shade, portal-streaks2, portal-streaks1, portal-flare8, portal-flare9, portal-flare10, clipping, exhaust3, hoverboard-thruster-rear, hoverboard-thruster-front, hoverboard-board, side-glow1, side-glow3, side-glow2, hoverglow-front, hoverglow-rear, exhaust1, exhaust2, rear-upper-arm, rear-bracer, gun, rear-foot, rear-thigh, rear-shin, neck, torso, front-upper-arm, head, eye, front-thigh, front-foot, front-shin, mouth, goggles, front-bracer, front-fist, muzzle, head-bb, portal-flare1, portal-flare2, portal-flare3, portal-flare4, portal-flare5, portal-flare6, portal-flare7, crosshair, muzzle-glow, muzzle-ring, muzzle-ring2, muzzle-ring3, muzzle-ring4
Events (1): footstep
IK constraints (7): aim-ik, aim-torso-ik, board-ik, front-leg-ik, front-foot-ik, rear-leg-ik, rear-foot-ik
Transform constraints (8): aim-front-arm-transform, aim-head-transform, aim-torso-transform, front-foot-board-transform, rear-foot-board-transform, toes-board, aim-rear-arm-transform, shoulder
Animations (13): aim, asd, death, hoverboard, idle, idle-turn, jump, portal, run, run-to-idle, sequence, shoot, walk
Complete.
The line you care about is:
Last export output: /path/to/last/export/dir
Hopefully that meets your needs!
Avatar
Nate

Nate
  • Postovi: 11802

fceek

Thank you Nate, for your patient and detailed reply.

I'm really glad to see this info to be added in the next release. As there is a path, there is a way I can make use of it. Can't wait for the 4.1.10 release!

BTW I totally understand the default in-place exporting behaviour for consistency. And I ran into the .spine/skeleton.json export bug as well yesterday LOL
fceek
  • Postovi: 3

Nate

Cheers! :beer: :D We've got a lot of stuff in 4.1.10-beta. There's still a fair amount that needs doing before we can release it. The biggest new item that is taking so much time isn't yet in the changelog.
Avatar
Nate

Nate
  • Postovi: 11802

fceek

Sorry but just one more quick question, when I tried to export some file using Spine -i xxx.spine -o somepath -e binary It told me export settings JSON file does not exist: C:\Windows\System32\binary.

As the documentation says Spine [-i <path>] [-m] [-o <path>] -e json[+pack]|binary[+pack] doesn't look like I need to specify a config file here. Any idea about what could be wrong?

Thanks.
fceek
  • Postovi: 3

Nate

That should work. Can you please show the entire actual command you run?
Avatar
Nate

Nate
  • Postovi: 11802


Natrag na Editor