When exporting a MOV file from a Spine project (including all skeletons and animations), Spine calculates an appropriate video size (with the export scale set to 100%).
Is there any way to get that size without actually exporting the MOV?
When exporting a MOV file from a Spine project (including all skeletons and animations), Spine calculates an appropriate video size (with the export scale set to 100%).
Is there any way to get that size without actually exporting the MOV?
Spine determines the video resolution by calculating the largest size needed to display the entire animation. However, there is currently no direct way to obtain this calculated size without actually exporting the MOV file. The size is based on the content within your project, and Spine uses this to ensure the entire animation fits within the video. If you need to know the size beforehand, you might consider using a placeholder or guide within your project to estimate the dimensions.
Export calculates the size, as Spinebot mentioned, by checking the bounds at each frame that would be exported and using the maximal bounds from that. The editor doesn't provide a way to calculate that, except by seeing it on the export dialog.
You could calculate it by writing some runtime code. Here is an example that poses the skeleton and prints bone information. You would calculate the maximal bounds instead.
EsotericSoftware/spine-runtimesblob/4.2/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/BonePlotting.java
Ah, this is closer. It calculates the maximal bounds of an animation:
EsotericSoftware/spine-runtimesblob/4.2/spine-ts/spine-player/src/Player.ts#L793-L819
You can get the setup pose dimensions from the CLI:
$ spine -i spineboy-pro.spine
Project info: C:\Dev\spine\spine-launcher\eclipse\user\backup\spineboy-pro-189-0.0.00.spine
Spine version: 4.0.07
Dopesheet FPS: 30
Skeleton: spineboy-pro
Size: 418.45 x 686.2
...
This size is for the setup pose though, animations can be larger or smaller.