Related Discussions
...

Is there a way to do a relative export path when exporting .json files?

I've tried a few things but have gotten mixed results non-of which are great.
Any info on this would be much appreciated.

You can enter a relative path on the export dialog, but it is converted to an absolute path (relative to the project file).

What is the goal? Are you sharing the project file with other users/computers and want the export to go to a path relative to the project file?

FWIW, you can export from the command line using relative paths:
Export - Spine User Guide: Command line

Hey Nate, thanks for the reply, and yeah we have multiple people working in the files and unfortunately not everyone's directory is the same.
I was hoping that we could put relative paths from the project to get to the same final exported folder even with different main directories.

As for the command line that would probably work but some of our designers aren't as technically skilled and would immediately be turned off using a command prompt.

Cheers,

Hello! As an artist myself, I can say double-clicking a .bat file with all the needed commands inside and getting what I need is easy enough to manage 😃 if your team is on windows you might want to consider that!

Yeah, I think we will be going with something similar, thanks for the feedback! 😃

10 months later

Bumping this thread as we are interested in having relative paths in the export dialog as well.
We are already using command line for generating the json, however for live reload it is much faster to export from spine. It would be nice to be able to share the export settings between users. I've made a topic (Improving CLI export time) describing our issue where we found the solution to be using spines own export.

10 months later

I'd love to have this feature as well. Now that our company is working from home due to Corona, not everyone will have the same directory structure and there are more than one that will use and export from the same Spine file.

a month later

I was very surprised to see that realtive paths didn't work. I would expect it to work. This makes working with the projects as a team very difficult

Oh this absolute path conversion is a nightmare especially if we work on dropbox and more animators and developers work/export. Can you please leave relative or simply what we write there and convert it only internally without touching our input? Please.

3 years later

For what it's worth in the short term, I discovered you can manually type into the export .json file the following:
"output": ".\\export",
When you use the load settings option and select that setting export json file, it picks up the local path the project is in. In this case I had a folder locally called "export". In theory you could save the export settings file on your network and have everyone agree to use it and if they need to modify, make sure they hand-update that output field again.

a year later

Hi, so I know this is old news, but I can't help but notice that there is still no way to save a relative export path to a spine project file.
Why is this important?

  • Without a relative export path you cannot create template projects that use spine. Let's say you want to create a template game, with a few spine files, that export into a runtime folder that is also part of that template. When you copy the template game, it will still export to the original template so you have to go through every, single, spine file and make sure the export path is correct

  • without relative export paths, you cannot use spine files in branches. Your spine files will always export into the original branch, which can mess up your entire pipeline

  • yes, you CAN create batch scripts that export for you, but in iterative development, every additional click and ESPECIALLY every change of tool should be avoided

I really like spine as a tool, but this one issue makes it so much harder to use it in a bigger pipeline. Please do not sweep it under the carpet

12 days later

Same here, I can only concur with what has already been said. In my work, spine is a key part of the development process, but the lack of relative exporting just really struck out as something really quite rigid. It's exacerbated too when using a form of version control to upload files as we tend to avoid including the full path of somebody's hard drive, not just for privacy purposes but mainly because you cannot guarantee the same directory structure is going to be used across the team.

This has also bugged my since forever and was almost promised years ago: 14795-request-relative-path-for-exporting

I can't see why the editor turns everything into an absolute path, when it could just let the user have it and let the filesystem sort it out.

I can edit an export.json and have a relative path in there, but you can't edit or touch that path in the editor.

Same for the input property in the export.json, its absolute. So if I want to export from command line, without overriding the input/output, ie automatic, then it has to be in the right location and not moved elsewhere.