Previous | Next

Harder conditionals


(if (= (car (gimp-selection-is-empty img))
       FALSE)
    (do-stuff-to-selection)
    (gimp-message "Nothing is selected")
)

There are some gotchas in script-fu. Like if you're running a true/false test like gimp-selection-is-empty, you can't just take the return value -- have to take the car.