- Düzenlendi
我在spine文件中做了很多个皮肤
但是当我导出json文件的时候,只能全部皮肤一起导出一份,不能每一个单独淡出一份
比如说,我想单独导出clothes_001这个皮肤的png,atlas和json文件,就只能把除了clothes_001这个皮肤以外的皮肤都删掉,再选择导出,如果不这样做,我导出来的png就会包含有所有皮肤的内容
请问有没有便捷一些的方式,让我在导出json的时候可以选择只导出其中一个皮肤
我在spine文件中做了很多个皮肤
但是当我导出json文件的时候,只能全部皮肤一起导出一份,不能每一个单独淡出一份
比如说,我想单独导出clothes_001这个皮肤的png,atlas和json文件,就只能把除了clothes_001这个皮肤以外的皮肤都删掉,再选择导出,如果不这样做,我导出来的png就会包含有所有皮肤的内容
请问有没有便捷一些的方式,让我在导出json的时候可以选择只导出其中一个皮肤
Kyle When exporting skeleton data, it is expected that the information for all skins for which the export option is checked will be included in a single skeleton data file. This is because skins are a feature designed to change the appearance of a skeleton while using a single skeleton, rather than splitting it into several separate skeletons. Therefore, exporting skeleton data for each skin sounds like a useless thing to do.
If you could explain why you want to do such exports, we might be able to advise you on how to better manage your skeletons.
If you want a single JSON file, a single atlas, but multiple PNGs, you might want to consider the "Image Folder" option for the Texture Packer as shown in the screenshot below:
When that option is selected, the texture packer will behave as described in the "Folder structure" section of the Texture packing guide.
As you can read from the guide, the texture packer will create an atlas for each subfolder, rather than packing all attachments in a single atlas.
This implies that you should reorganize your images into separate folders and update your attachments accordingly (you can rename attachments quickly with a combination of the find and replace tool and regular expressions).
You can also run the texture packer separately,, or using it through the Spine CLI.
We don't currently have a way to pack each skin into a separate atlas. We have an issue to track the enhancement:
EsotericSoftware/spine-editor720
You can subscribe to the issue to be notified when the status changes.
If we had that feature, it would only help if you always want one atlas per skin. It would not be sufficient if you want multiple skins in one atlas.
The most flexible solution is to write a script to copy your images into a temporary folder so you can pack them like you want. For example, copy all the images you want in a single atlas to a folder, then pack them. By using a convention to organize your images and then writing a script, this can scale to any number of images.
A similar solution could be to parse the skeleton JSON data to get all the image paths for each skin. Then you can copy them to a folder and pack them. This has the added benefit that you could write application specific logic, like combining multiple skins into a single atlas.