How to get number of frames in sprite via Aseprite API?

Hi there!
I’m trying to get number of frames in a aseprite file and couldn’t find this function in official Aseprite API help: https://github.com/aseprite/api/blob/master/api/frame.md

Could somebody help, please? :slight_smile:

thank!

Try this

1 Like

Hi there @costanalobin, you can use the # operator with app.activeSprite.frames:

print(#app.activeSprite.frames)
2 Likes

@dacap this worked! thanks so much!

1 Like