Bernd 07/07/2018 (Sat) 00:03:59 No.17784 del
(5.25 KB 358x195 wtflisp.png)
>>17783
That thing about editing the layer name to change the frame properties is a blatant hack. This was bothersome for me because I needed to control the timing of frames broadly over dozens of frames and doing so manually was obviously out the question so I wrote some bydlo-level lisp to automate that. Here is simple example:

(define (-1+ n)
(- n 1))

(define (rename-all-layers image renamer)
(let*
((res (gimp-image-get-layers image))
(nlayers (car res))
(layers (vector->list (cadr res)))
(loop
(lambda (total-layers layers)
(if (> (length layers) 0)
(let*
((layer (car layers))
(layer-index (-1+ (length layers)))
(layer-name (renamer layer layer-index total-layers)))

Message too long. Click here to view full text.