Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Troubles with porting a script to Gimp3
#15
alvk, Thank you for your updated code and explanation, it's going to be a useful template.

Have you tried running it on, for example, a layer group to check you're getting your cannot add label message. I think the (< 1 layer-type) is never true. You checked for = 1 before.

(03-08-2025, 10:14 AM)alvk Wrote:
Code:
   (if (< 1 layer-type)
     (begin (gimp-message "Cannot add the label to the selected layer"))
     (begin (set! text-layer (gimp-text-font image -1 text-layer-position-x
                                             text-layer-position-y user-text 0 #t
                                             font-size font))
            (gimp-text-layer-set-color text-layer font-color)
            (gimp-item-set-lock-position text-layer #t)))
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 teapot - 03-08-2025, 05:14 PM

Forum Jump: