03-05-2025, 01:24 AM
(03-04-2025, 03:50 PM)Ofnuts Wrote: In Gimp3 your "drawables" argument is a list (or a vector) of drawables and no longer a unique drawable. So either you iterate the list (if you accept desveral drawables) or you pick the fist element. There are registration flags to tell if you accept 0, 1, or more drawables.
Thank you for your suggestion. I have included the flag SF-ONE-DRAWABLE, but nothing has changed.
After more careful reading, I came to the following. If I use v3 dialect of Script-Fu, i.e., by inserting the following code at the top of the script:
Code:
(script-fu-use-v3)
https://www.gimp-forum.net/Thread-Script-fu-V3-plug-ins
I get the following error:
Code:
car: argument 1 must be: pair
Code:
Error: runtime: resource ID of improper subclass. (1 2573)
Code:
(let* ((off-x (car (gimp-drawable-get-offsets (vector-ref drawables 0))))
(off-y (cadr (gimp-drawable-get-offsets (vector-ref drawables 0))))