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

Trim Sprite option is ignored #3740

Closed
Geokureli opened this issue Mar 9, 2023 · 4 comments
Closed

Trim Sprite option is ignored #3740

Geokureli opened this issue Mar 9, 2023 · 4 comments
Labels
not a bug When the reported issue actually is expected behavior scriptable The issue might be possible to be implemented with a script in the present or in the near future.

Comments

@Geokureli
Copy link

Geokureli commented Mar 9, 2023

v.1.2.4-x64 for Mac
example.zip

The above example .aseprite file is 512x512, if I select Sprite > Trim it becomes 201x148. When I export with Trim Sprite enabled I expect the json frames to have a sourceSize of { "w": 201 "h": 148 } but it is actually { "w": 512, "h": 512 }

Screenshot 2023-03-09 at 1 11 26 PM

@Gasparoken Gasparoken added the not a bug When the reported issue actually is expected behavior label Mar 13, 2023
@Gasparoken
Copy link
Member

'Trim Sprite' option on 'Export Sprite Sheet' works only to trim the whole sprite before its frames are included in the sprite sheet, but it hasn't influence to 'sourceSize' field. 'Trim Sprite' is useful to get a sprite sheet of a smaller size.
The Json data must be able to reconstruct the animation at its original size, that's why that size is displayed.

Just in case: Difference between 'Trim Sprite' and 'Trim Cels'

This is not a bug.

@Geokureli
Copy link
Author

Geokureli commented Mar 13, 2023

Should there be a different checkbox for this? It would save me the trouble of resizing and re-trimming the image every time i add/edit frames

Also seems like trim sprite does nothing if trim cels is checked

@Gasparoken Gasparoken added the scriptable The issue might be possible to be implemented with a script in the present or in the near future. label Mar 14, 2023
@Gasparoken
Copy link
Member

This can be done through a simple script, even with a little extension (i.e. adding a custom command in the File menu)

trimSpriteBeforeExport.lua

app.command.AutocropSprite{}
app.command.ExportSpriteSheet{ui=true}
app.command.Undo{}

This script trims the sprite > open the export sprite sheet dialog > finally 'undo' the 'Trim Sprite' command.

You're right, 'Trim Cel' always trims the same or more than 'Trim Sprite', then it seems like Trim Sprite does nothing.

@Geokureli
Copy link
Author

thanks for the tip, and for answering my questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not a bug When the reported issue actually is expected behavior scriptable The issue might be possible to be implemented with a script in the present or in the near future.
Projects
None yet
Development

No branches or pull requests

2 participants