Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Troubles with porting a script to Gimp3
#6
(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)
and run the script as it was described here
https://www.gimp-forum.net/Thread-Script-fu-V3-plug-ins
I get the following error:
Code:
car: argument 1 must be: pair
however, if I'm using v2 dialect of Script-Fu and start the script as usual one, the error is different
Code:
Error: runtime: resource ID of improper subclass. (1 2573)
this code
Code:
(let* ((off-x (car (gimp-drawable-get-offsets (vector-ref drawables 0))))
     (off-y (cadr (gimp-drawable-get-offsets (vector-ref drawables 0))))
works fine, and I cannot figure out where this error came from.
Reply


Messages In This Thread
Troubles with porting a script to Gimp3 - by alvk - 03-03-2025, 10:42 AM
RE: Troubles with porting a script to Gimp3 - by alvk - 03-05-2025, 01:24 AM

Forum Jump: