Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
migrating 2.8 bash scripts to gimp 3
#3
(6 hours ago)programmer_ceds Wrote: In this case you need gimp-image-get-selected-drawables which returns a list of the selected drawables.

Use "Help/Procedure Browser" to search for key words in the functions that you need to updated.

Also looking at the built-in scripts may help you.

Thank you for your help,

yes, I've struggled with this solution, but it seems there's something I don't do the right way to handle the array of drawables.
This works:
Code:
gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
    let*(\
        (image (car (file-png-load 1 \"input.png\")))\
    )\
    (gimp-file-save 1 image \"output.png\")\
)"
but this:
Code:
gimp -i --quit --batch-interpreter=plug-in-script-fu-eval -b \
"(\
    let*(\
        (image (car (file-png-load 1 \"input.png\")))\
        (drawable (vector-ref (gimp-image-get-selected-drawables image) 0))\
    )\
    (gimp-file-save 1 image \"output.png\")\
)"

throws me the following error:

Code:
Error: vector-ref: argument 1 must be: vector


I'm sorry in advance for my poor knowledge of this Scheme syntax...
Reply


Messages In This Thread
RE: migrating 2.8 bash scripts to gimp 3 - by vince - 5 hours ago

Forum Jump: