It is currently Mon May 20, 2024 7:59 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Can someone please make a script fu that does this
PostPosted: Thu Feb 08, 2024 9:34 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1423
1. Hide Original Text layer
2. Duplicate Text Layer (that's visible)
3. Layer to Image Size Duplicate text layer


That's it. So my text styling plugins can apply. Is anyone up making a script to do this?

As of currently I do it with keyboard shortcuts.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Can someone please make a script fu that does this
PostPosted: Thu Feb 08, 2024 10:47 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Dec 09, 2018
Posts: 645
contrast_ wrote:
1. Hide Original Text layer
2. Duplicate Text Layer (that's visible)
3. Layer to Image Size Duplicate text layer


That's it. So my text styling plugins can apply. Is anyone up making a script to do this?

As of currently I do it with keyboard shortcuts.

Try this:
; The request was:
;   1. Hide Original Text layer
;   2. Duplicate Text Layer (that's visible)
;   3. Layer to Image Size Duplicate text layer

; After changing the script remember to do Filters -> Script-Fu -> Refresh Scripts.

(define (script-fu-ctext image drawable)

  (if (= (car (gimp-item-is-group drawable)) TRUE)
    (begin
      (gimp-message "Choose a layer not a layer group.")
      (quit)))

  (gimp-image-undo-group-start image)
  (gimp-item-set-visible drawable FALSE)

  (let* ((new-layer (car (gimp-layer-copy drawable FALSE))))
    (gimp-image-insert-layer image new-layer 0 -1)
    (gimp-item-set-visible new-layer TRUE)
    (gimp-layer-resize-to-image-size new-layer)
  )

  (gimp-image-undo-group-end image)
  (gimp-displays-flush)
)

(script-fu-register
  "script-fu-ctext"                          ; Name
  "C Text"                                   ; Menu label
  "Some stuff for contrast_"                 ; Description
  "Author"                                   ; Author
  "Copyright"                                ; Copyright
  "Feb 2024"                                 ; Date
  "RGBA"                                     ; Types
  SF-IMAGE      "Input image"           0
  SF-DRAWABLE   "Input drawable"        0
)

(script-fu-menu-register "script-fu-ctext" "<Image>/Filters")


Top
 Post subject: Re: Can someone please make a script fu that does this
PostPosted: Fri Feb 09, 2024 9:17 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1423
This is awesome!!! can I put this on my Github for people who use my plugins. I'll credit you or you could put it on your own Github?


Top
 Post subject: Re: Can someone please make a script fu that does this
PostPosted: Fri Feb 09, 2024 9:32 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Dec 09, 2018
Posts: 645
contrast_ wrote:
This is awesome!!! can I put this on my Github for people who use my plugins. I'll credit you or you could put it on your own Github?

Feel free to put on your Github and use as you wish. (I don't have a Github).


Top
 Post subject: Re: Can someone please make a script fu that does this
PostPosted: Fri Feb 09, 2024 10:22 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 31, 2020
Posts: 1423
done. I gave you full credit.

https://github.com/LinuxBeaver/Script-F ... -s-plugin-


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Looking for Script Coder to make Script of my VHS effect

2

No new posts Attachment(s) Make Token script for Gimp 2.10

4

No new posts Attachment(s) Make a brush - Make a mandala

313

No new posts Attachment(s) how could i make this background

7

No new posts Attachment(s) Cannot run test script-fu script via console

7



* Login  



Powered by phpBB3 © phpBB Group