qiankai

Hi there,
Currently I have lots of spine project files and each of them has an Input Folder and an Atlas name in Texture Packer Settings(Cmd+P). I don't want to copy it one by one. Is there a way to read Texture Packer - Input Folder and Atlas name via command line? See in the attachment. I did not find any tip of it, so...
截屏2020-05-02下午9.54.43.png
У вас нет необходимых прав для просмотра вложений в этом сообщении.
qiankai
  • Сообщения: 3

Nate

Hmm, it's an interesting problem. The Spine project file format is not easily parsed. There is a command line option -i project.spine but it doesn't dump the paths (there are many, a list stored for each of various path categories). You may be able to get at least some of the paths out of the recent paths file, which is here:

Windows: <user home folder>\Spine\recent.json
Mac: <user home folder>/Library/Application Support/Spine/recent.json
Linux: <user home folder>/.spine/recent.json
Аватара пользователя
Nate

Nate
  • Сообщения: 9861

qiankai

No, it won't work. I want to find input path and atlas name in each of thousands of spine files.
Although it is difficult to parse Spine project, is it possible anyway? It'll still be easier to write a complex snippet than to go through thousands of them.
Btw, I'm using version 3.5.51.
qiankai
  • Сообщения: 3

Nate

I'm afraid it's nearly impossible to parse the Spine project file. It's not a file format with a documented structure that is intended to be read by anything except Spine. Even inside Spine we don't have code to parse a specific format, instead the structure can change across Spine versions and is directly related to the data structures Spine keeps in memory.

The only way to do it would be for Spine to do it for you. We could add a CLI option to do so. That wouldn't be a problem if we were currently releasing beta versions, but unfortunately we are in the space between 3.8 non-beta and the 3.9 beta. We are working very hard to get the beta released as soon as possible! I'm very sorry that we aren't able to add the CLI option for you until then.
Аватара пользователя
Nate

Nate
  • Сообщения: 9861

qiankai

Perhaps we are going to upgrade Spine to version 3.8. It's not been decided though. I'll try to figure out another way. Thanks anyway.
qiankai
  • Сообщения: 3

Nate

FWIW, 3.8 is quite stable, both editors and runtime. When we do have a 3.9 beta you'd be able to use the CLI option to dump the paths without needing to save your projects with the 3.9 beta (they could stay at 3.8 or even earlier versions).
Аватара пользователя
Nate

Nate
  • Сообщения: 9861


Вернуться в Editor