Greetings. I have recorded a timelapse with auto snapshot, making each 10 action a frame. But it turned out to be too long. I wanna leave 1 of each 10 frames and delete the others. Any way to do it automatically?
A similar question was asked on the Steam forum a while ago: Is there a way to quickly remove every other frame? :: Aseprite General Discussion . A Lua script could be written to automate the process. I’m not sure if this will do what you want exactly, but if not maybe you could use it as a reference to build your own. Below I’ve changed from every other to delete 9, skip 1.
-- https://steamcommunity.com/app/431730/discussions/0/3464983493943481159/
local delete = 9
local skip = 1
local offset = 0
local sprite = app.activeSprite
if not sprite then return end
-- If you want to delete cels, not frames:
-- local layer = app.activeLayer
-- if not layer then return end
-- if layer.isGroup then return end
local all = delete + skip
local frames = sprite.frames
local lenFrames = #frames
app.transaction(function()
local i = lenFrames
while i > 0 do i = i - 1
if (i + offset) % all < delete then
sprite:deleteFrame(frames[1 + i])
-- To delete cels instead of frames
-- in cases where sprite has multiple layers.
-- local cel = layer:cel(frames[1 + i])
-- if cel then
-- sprite:deleteCel(cel)
-- end
end
end
end)
Best,
Jeremy
Thank you! I didn’t try it 'cause I’ve already done it manually, but thanks anyway!