@bon, when the skeleton data is loaded, the AttachmentLoader has a chance to configure the attachments with atlas regions. This is optional, it can configure all, some, or none. However, by the time rendering occurs the attachments the will be rendered must have a region (see SkeletonRenderer). If they won't be rendered, they don't need a region.
You could write an AttachmentLoader that does not set any regions. Then, you could write code that takes your skeleton, goes through all the attachments, and sets the regions from either the close up atlas or the far away atlas. When you render, you can set the attachment visibility (for each slot or using skins) so only the close up or far away (or all) attachments are visible.
Or, you could load the skeleton data with the close up atlas or the far away atlas. This requires loading the skeleton twice, but that may be fine depending on your needs. AtlasAttachmentLoader gives an error when a region can't be found, so you'll need to customize it to not set a region if no region was found in the atlas.
Nick wroteRemember 10 months ago I feature request the -skin command
@Nick yes, though it was 7 months ago. 😉 The post you linked is hard to follow and I'm not sure it's the most relevant thread. The thread where you mentioned a -skin
parameter is here:
I tried to export with command line but not file is created.
@bon, note there is also AttachmentLoader explanation in that thread (from this post to the end):
I tried to export with command line but not file is created.: p62815
Nick wroteIt require modification to the runtime codes and I need to re-apply it everytime the runtime get updated.
@Nick, you do not need to modify the runtimes, customizing the AttachmentLoader is part of the API. You can implement your own AttachmentLoader in your own codebase. That is much better than modifying AtlasAttachmentLoader in the runtimes. You can copy AtlasAttachmentLoader into your own code and modify it to your needs. For example, to remove making it an error when an atlas region is not found. It will still be an error if you try to render an attachment that doesn't have an atlas region.
@Nick I've added clarification here and also explained more about how I think your setup is best accomplished. @bon you may also find that useful.
Note the skeleton data is always going to contain everything. Exporting data, images, or video is what we call "export". The use case discussed here is really about 1) how to pack images into multiple atlases and 2) how to find those regions at runtime using AttachmentLoader. I wouldn't call that partial or selective export, or even export at all. Instead, we call that texture packing.