• Bugs
  • Another Exporting Issue

  • Изменено
Related Discussions
...

Hi Guys! Spine is a great tool, I really love it! I use it for cocos2d-iphone project.

I run into a problem with project exporting. I use JSON format with "Texture packer" option selected. My image files contain digits at the end of their names, like "left_hand_1", "left_hand_2" and so on... When I first exported the project and tried to run it on ipad I got the runtime error "Error: Region not found: left_hand_1". I looked at spineboy.atlas file and found that instead of "left_hand_1" and "left_hand_2" region params there were "left_hand" and "left_hand", seems like texture packer cuts of digits when exporting. Keeping this in mind I replaced digits with letters, "left_hand_a" and "left_hand_b" and this time everything worked brilliant.

So personally I found the workaround, but it would be great if you could check and fix this exporting issue.

Thanks.

  • Изменено

Confirmed. I ran into this problem before and it's specific to LibGDX atlas format. It's actually a feature more than a "problem". But I have no idea what the feature is for.
It also happens in the standalone TexturePacker Pro program but I couldn't find the option in the standalone to disable it. But I think you can disable it in Spine.

Go look for the Spine Texture Packer Settings, and then look for the checkbox that says "Use indexes" on the lower right part of the panel. And UNCHECK that. See if it works.

Otherwise, just avoid using _### at the end of your filenames.

Thanks for your reply, Pharan.

Surprisingly, but unchecking "Use indxes" really helps. It is kind of strange that you need to uncheck this option to enable use of indexes.

windimax написал

Thanks for your reply, Pharan.

Surprisingly, but unchecking "Use indxes" really helps. It is kind of strange that you need to uncheck this option to enable use of indexes.

The feature is used in Libgdx to obtain an array of TextureRegions to use in the Animation class (which is not the same as Spine's Animation class). The class in libgdx is used for frame-by-frame animations.

It is meant to be a convenient way for packing your spritesheets and get them right away with just one search of your animation, so for example "anim_1.png, anim_2.png" are loaded as "anim" without searching for every region (which would be bad if you add more images later).

With the option unchecked, it packs them without caring about the underscore and number.

Thanks for the clarification Cuellarjmcg. I suspected it had something to do with frame-by-frame things.

I guess it'll see support in Spine when the animated textures/slots come in.

10 дней спустя

I've made useIndexes unchecked by default (that is, for anyone running Spine for the first time). I also turned on whitespace stripping and rotation by default, since these make sense for Spine.