BOV

When exporting animation to png. When you select a folder(Output-prefix) where to save the animation, it is not selected 99 times out of 100. You have to copy the path and paste it into the export line manually.

The principle when it is inserted, and when not, I could not understand.

Bug at least six months. windows 10.
BOV
  • Posts: 8

Luke

Hello, thank you for reporting your issue with the output prefix.
What version(s) of the Spine Editor are you using when the output prefix does not function as intended?
Luke

Luke
  • Posts: 149

BOV

All versions of spine 4 and probably earlier

After careful testing, I noticed the following:

If during export you open the folder where you saved the project (usually), create a folder there and select it, then the selection does not occur. Unable to select a folder in the Windows file|folder selection window. If you write a name in the file field, any, then the save button works. But this is inconvenient, because in the Output-prefix line in the file export window, you have to delete the garbage.

1. C:\Spine\MyProject
2. Click by [Output-prefix] select path
3. Create [Output] folder
4. Select C:\Spine\MyProject\Output <- Don't work

Output-prefix: C:\Spine\MyProject\Output It is not possible to choose.

You have to write abracadabra in the file selection window. After that, you can select the export folder, but the path is the following

C:\Spine\MyProject\Output\abracadabra

And then delete: abracadabra
in order to keep the sequence of png to Output

C:\Spine\MyProject\Output

---

Version of my spine is 4.1.15
BOV
  • Posts: 8

Misaki

It seems that you create a folder in Windows Explorer before exporting, but actually, you can create a folder at the same time as exporting by adding any folder name to Spine's Output folder. For example, let’s assume the original path was below:
/Users/<user name>/Library/Application Support/Spine/examples/4.1/spineboy/spineboy.png

You can add the name of the new folder you want Spine to create in the last part:
/Users/<user name>/Library/Application Support/Spine/examples/4.1/spineboy/ExportedPNG/spineboy.png

If you specify the path like the above and press the Export button, it will create a new folder and save the files in it if there is no matching folder. Since this is more efficient, I recommend specifying the path in this way unless there are special reasons. (Precisely, the more efficient and most recommended method is to export via command line interface: Command line interface - Spine User Guide)

Or do you have a particular reason why you need to create a folder in Explorer?
User avatar
Misaki

Misaki
  • Posts: 1164

BOV

The crutches you offer are even worse than the ones I use.

1. Are you suggesting that I memorize project paths?

I am working in one project exporting 3 animations. I open a new one and have to fill the export path from memory?

Projects have different paths. Spine does not remember import paths and does not substitute them into the output prefix. I have to write the path with my hands.

2. Why should I write spineboy.png?
I have 3-5-10 animations and they are not called by the same name. They are unloaded under their own names: [skeletonName-animationName.png]. What does it have to do with what I write in the path to the names in the final file?
I can also write there what I am writing now: abracadabra

---

Also, I can export the same animations several times to the same folder. Working alternately on different projects. And if I make a mistake typing the path manually, spine will create another folder for me with an erroneous name.

CLI has nothing to do with the problem. I work in gui (Spine Editor), then for some reason I have to go to the command line?

---

The string is called output-prefix, which is why you need to specify the file name in it, like [/ExportedPNG/spineboy.png/filename.png]? It's not logical.

Prefix is what is written before the file name.

/Users/<user name>/Library/Application Support/Spine/examples/4.1/spineboy/ExportedPNG/spineboy.png <- fullpath
/Users/<user name>/Library/Application Support/Spine/examples/4.1/spineboy/ExportedPNG/ <-prefix
BOV
  • Posts: 8

Misaki

Sorry that my response confused you.
1. Are you suggesting that I memorize project paths?
No, you can specify the folder you want to create a new folder via the browse button, then you can enter the new folder name at the end of the path.
2. Why should I write spineboy.png?
I have 3-5-10 animations and they are not called by the same name. They are unloaded under their own names: [skeletonName-animationName.png]. What does it have to do with what I write in the path to the names in the final file?
You are right, in this case it was the specification of the Output prefix, so the <filename.png> was unnecessary. I got confused because the same field for PNG export changes to Output file when Current Pose is specified in the Export type field. Sorry about that.
CLI has nothing to do with the problem. I work in gui (Spine Editor), then for some reason I have to go to the command line?
The reason I mentioned the CLI is because it is actually recommended to save the export settings as a JSON file and export your skeleton via the CLI with the JSON file rather than exporting it via the GUI. For example, if a setting JSON file is saved after setting the correct path for the output folder each time, you can load it when the correct path is lost from the Output prefix, such as after editing another project.
Export - Spine User Guide: Saving and loading export settings

However, finding and loading the JSON file itself is somewhat of a hassle, so it is easier to write and save a command that can load and export the JSON file, especially if there is a possibility that it will need to be exported over and over again.
User avatar
Misaki

Misaki
  • Posts: 1164

BOV

Please clarify. What I'm talking about will be marked as a bug and added to the list of bugs to fix?
BOV
  • Posts: 8

Misaki

Sorry for being unclear on that point. I actually could not reproduce the problem on my Mac PC, but I have confirmed that the problem can be reproduced on Windows PC.
We are investigating the problem, so please wait a while for a response.

---

We found that there was a bug. If a skeleton had no skins, it would export as if "all skins" was selected. that looked like "multiple animations" needed to be exported by other code, so it wasn't doing the output prefix correctly. We will fix that in 4.1.

However, it was sort of intentional that the output prefix was not to select a folder, because we thought there might be a demand for customizing the prefixes of the output files. For example, compare the two different ways of writing Output prefixes below:
1.C:/skeleton/exportedPNG/
2.C:/skeleton/exportedPNG/anim
In the first case, the exported files will be named <animationName> + _<frameNumber>, e.g. walk_001.png.
In the second case, the exported files will be named "anim" + <frameNumber>, e.g. anim_001.png.
This is the reason why the field was named "Output prefix" instead of "Output folder".

The update has not been released, so I will inform you when it becomes available.
User avatar
Misaki

Misaki
  • Posts: 1164

BOV

I roughly understand what you were thinking. But I can say that manually entering the prefix each time is very difficult. And given that sometimes you have to upload a lot of animations, choosing a folder is the best thing you can do.

Considering that animations are uploaded with names:
<SkeletonName>-<SkinName>-<AnimationName>_<frameNumber>.png
there is no need to write the prefix manually.

Please fix it on Linux too. There is the same problem.


.
BOV
  • Posts: 8

Nate

If you enter a path to a folder, Spine chooses the file names for you. If you enter a prefix, Spine only appends the frame numbers to your path. This allows people to choose their own file names, if they want to do so. It makes for some trouble with the file dialogs though, as we can only have the dialog choose a file (for the prefix) or a folder. We've changed it to choose a folder in 4.1.17, which will be released soon. The change also affects Spine on Linux.

FWIW, as Misaki mentioned, if you are doing many exports it can be useful to write a shell script to export them all with Spine's CLI. In exchange for the initial setup, this removes tedious clicks and ensures everything is exported correctly each time. It is also easy to export everything, to be sure the animations match the project files.
User avatar
Nate

Nate
  • Posts: 12213

BOV

Thank you! It has become much more convenient.
BOV
  • Posts: 8


Return to Bugs