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

Is there a way to Trim imports? #24

Open
Kylemcarthur opened this issue Jan 25, 2024 · 1 comment
Open

Is there a way to Trim imports? #24

Kylemcarthur opened this issue Jan 25, 2024 · 1 comment

Comments

@Kylemcarthur
Copy link

Title. Latest Aseprite (1.3.2) and Godot (4.2.1) versions.

image

Also, why are the frame durations all set to 0.1 and 1 FPS? That's not how it's set in Aseprite.
Also, is there any sort of layer control? It looks like it's just defaulting to visible layers in the Aseprite document.

I've gone through every bit of documentation I can find on this plugin, and there really just isn't sufficient explanation about what this import is supposed to do exactly or how to get it to do whatever that is. It's currently faster and easier to just do the exports manually out of aseprite, so I hope I'm just being a dingus and doing things wrong.

@nklbdev
Copy link
Owner

nklbdev commented Feb 1, 2024

I'm sorry, I'm incredibly busy right now. I will only be able to answer you at the end of the week.

Aseprite cannot actually guarantee a constant frame rate. It can only set the same duration in each frame. But you can edit it in the properties of any frame.

Therefore, when importing into Godot, Importality cannot specify the FPS of 10 or 20 frames per second. It has to specify an explicit duration in each frame individually.

Now in your screenshot, each frame has duration of 100 milliseconds (0.1 seconds).

You can control the animation FPS in runtime or in a post-import script as a multiplier to the overall animation speed.

For example, if you set it to 2, the animation will run twice as fast as in Asepritе.

You can trim sprites in atlas (to save memory) but you can not trim size of sprite. Sprite will have same size as in Aseprite.
image

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

No branches or pull requests

2 participants