Get GIMP version (so scripts can be backwards compatible to 2.6)
I just created this stand alone script so that I can make my scripts work in 2.8 and 2.6. This used to be part of another script I had, so I'm not sure whether or not I needed to do script-fu-register, but it's working for me in 2.8.0 without having that.
There is an example usage in the header, but I'm showing it here, too:
; Example usage:
;
; ; Determine if GIMP version is greater than 2.6.X
; (set! gimpVersionHigherThan2pt6ptX (isGimpVersionHigherThan2pt6ptX))
;
; (if (= gimpVersionHigherThan2pt6ptX TRUE)
; (begin
; (gimp-image-insert-layer theImage ImageCopyLayer 0 -1) ; (gimp-image-insert-layer image layer parent position)
; ) ; end begin condition is true
; (begin
; ; This works in 2.6.x but is deprecated in 2.7.x and higher.
; (gimp-image-add-layer theImage ImageCopyLayer -1)
; ) ; end begin condition is false
; ) ; end if
AttachmentSize
GetGIMPVersion.scm6.82 KB
Weiterlesen...