Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image export does not correctly detect maximum bounds when no animation is selected #787

Closed
misaki-eymard opened this issue Apr 9, 2024 · 2 comments

Comments

@misaki-eymard
Copy link

Description:
Depending on whether animation is selected or not, the maximum bounds for exporting in image formats such as GIF and PNG will vary. The animation selected does not have to match the animation to be exported; as long as an animation is selected, the image can be exported without being cropped.

This behavior can cause undesirable cropping, especially when performing exports via the CLI.

Expected behavior:
Whether or not an animation is selected, the maximum boundary of the animation is correctly recognized.

Steps to reproduce:

  1. Download the attached .zip file: incorrect-bounds.zip
  2. Open the Spine project contained in the .zip with Spine 4.2.64-beta.
  3. Switch to the animate mode.
  4. Do the GIF export with the default settings.
  5. You should see the following results for the exported image:
    exported-GIF
  6. Then, after select the animation on the Tree view, do the GIF export with the default settings again.
  7. You should see the following results for the exported image:
    exported-GIF

The version of Spine in which this issue was found:
Spine 4.2.64-beta

This issue was reported on the following thread:
https://esotericsoftware.com/forum/d/25962-%E5%85%B3%E4%BA%8Egif%E5%9B%BE%E7%89%87%E5%AF%BC%E5%87%BA%E7%9A%84%E9%97%AE%E9%A2%98

@NathanSweet
Copy link
Member

4.2.66-beta

@NathanSweet
Copy link
Member

NathanSweet commented Apr 11, 2024

There was a misunderstanding as to how this should work. Region sequences always use the size of the setup sequence frame. If some images in the sequence are a different size, they are scaled to the size of the setup sequence frame. This is similar to how it works for meshes.

Requiring the same size (or scaling) is what most users will do anyway. Any extra whitespace can be stripped by texture packing.

It works this way for simplicity and technical reasons. There is less work to do at runtime to change the region. Also, for exports, we would need to load ALL sequence images to determine their size before we could start an export, and then load them all again to perform the export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants