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!