It is currently Tue Apr 23, 2024 5:08 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 3:58 am  (#1) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13015
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
I'm working on an image,
that has many text layers.
I want to do a Text To Path on every text layer,
without having to do each and every Text To Path individually.

Does anyone know of a script that does this? :puzzled
If not.
I was thinking of a script,
which would do the Text To Path function on any visible text layer.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


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: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 5:39 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
It could be done. :)

gimp-vectors-new-from-text-layer
gimp-image-insert-vectors

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 6:46 am  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13015
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Rod wrote:
It could be done. :)

gimp-vectors-new-from-text-layer
gimp-image-insert-vectors

It could?

Do tell... :bowdown

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 7:22 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Wallace wrote:
Rod wrote:
It could be done. :)

gimp-vectors-new-from-text-layer
gimp-image-insert-vectors

It could?

Do tell... :bowdown

Would you want it to select ALL text layers or just certain ones?
I am just wondering if there is a way to select all text layers and using gimp-item-get-selection select the alpha for all layers at once.Then create and add the paths.
gimp-item-is-text-layer
This procedure returns whether layer or item is a text layer and IF it is select that items alpha (TRUE/FALSE). I think that's possible.

Selecting the items alpha on USER DEFINED text layers only, this may require to have the layers be named a certain way. OR having the user link those they want changed.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 8:09 am  (#5) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13015
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Rod wrote:
Wallace wrote:
Rod wrote:
It could be done. :)

gimp-vectors-new-from-text-layer
gimp-image-insert-vectors

It could?

Do tell... :bowdown

Would you want it to select ALL text layers or just certain ones?
I am just wondering if there is a way to select all text layers and using gimp-item-get-selection select the alpha for all layers at once.Then create and add the paths.
gimp-item-is-text-layer
This procedure returns whether layer or item is a text layer and IF it is select that items alpha (TRUE/FALSE). I think that's possible.

Selecting the items alpha on USER DEFINED text layers only, this may require to have the layers be named a certain way. OR having the user link those they want changed.

I want to make paths from all the text layers in my project.
Having the visible text layers only create paths.
I thought would make it a bit more practical or useful.
I'm not happy with the way paths are made for selections.
I'm not sure how Text To Path creates it's paths,
but they'er much more accurate.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 8:12 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
ask FP, he is the specialist on such kind of filters (he did many)

_________________
"Where am I ?"


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 8:35 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
This one will create a path from one text layer. I am having issues trying to get linked layers to convert to vector however. This is basically just text to path so kinda useless.

;;; Description:
;;; Creates paths from all text layers in the image.
;;; -----------------------------------------------------------------------------
;;; Change Log:
;;; Version-1.0
;;;
; Information can be found at GimpChat.com
;
; License: GPLv3
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; To view a copy of the GNU General Public License
; visit: http://www.gnu.org/licenses/gpl.html

(define   (script-fu-all-text-layers-to-paths image drawable)
   

   
           ;;begin image undo and reset
          (gimp-context-push)
          (gimp-image-undo-group-start image)   
       

           ;;make sure the layer is a TEXT layer       
    (let* ((myTextPath (car (gimp-vectors-new-from-text-layer image drawable))))       
           

           ;;convert text layers to path layers           
          (gimp-image-insert-vectors image myTextPath 0 0)
       
           ;;set all user settings back to before script ran or undo filter
          (gimp-displays-flush)
          (gimp-context-pop)
          (gimp-image-undo-group-end image)
    )   
)   
           ;register menu location and information   
       (script-fu-register "script-fu-all-text-layers-to-paths"
        "<Image>/Rod/All text layers to paths"
        "Creates paths from all text layers"
        "Rod Detmer"
        "Rod Detmer"
        "September 2016"
        "RGB*"
        SF-IMAGE       "Image"            0
        SF-DRAWABLE    "Drawable"         0
       )


_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Last edited by Rod on Sun Sep 25, 2016 10:10 am, edited 1 time in total.

Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 8:36 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Still a work in progress i guess. :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 10:30 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Using the above script you can still just arrow up or down in the layers list and hit Ctrl F to redo the filter.
You can't do that with "Text to Path" :)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 11:18 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Rod wrote:
Using the above script you can still just arrow up or down in the layers list and hit Ctrl F to redo the filter.
You can't do that with "Text to Path" :)


Assign a shortcut key

Attachment:
text-to-path-key.jpg
text-to-path-key.jpg [ 75.48 KiB | Viewed 3709 times ]

_________________
Image


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 11:25 am  (#11) 
Offline
GimpChat Member

Joined: Sep 20, 2016
Posts: 293
Wallace wrote:
I'm not happy with the way paths are made for selections.
I'm not sure how Text To Path creates it's paths,
but they'er much more accurate

Thats because a font is a vector file, while alpha to selection turned into a path is a detour.


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 11:25 am  (#12) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
here ya go Wallace.
available under <Image>/Python-Fu/Visible Text Layers To Paths


Attachments:
visible_text_to_path.zip [1.27 KiB]
Downloaded 114 times

_________________
TinT
Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 11:37 am  (#13) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
Maybe a make paths visible and merge-visible-paths to round it off.

_________________
Image


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Sun Sep 25, 2016 11:55 am  (#14) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13015
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
here ya go Wallace.
available under <Image>/Python-Fu/Visible Text Layers To Paths

You've done it again my man!
You're a Rock Star trandoductin!
:rocknod
Thanks.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Mon Sep 26, 2016 6:17 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
trandoductin wrote:
here ya go Wallace.
available under <Image>/Python-Fu/Visible Text Layers To Paths

Thanks Tran! :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Multiple Text Layers To Path?
PostPosted: Mon Sep 26, 2016 6:37 am  (#16) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Multiple Layers Attributes/Mode .scm Updated

0

No new posts Attachment(s) ofn-text-path-selection

14

No new posts Aligning Text on a Circle Path

2

No new posts Attachment(s) No scrollomg interface for text logo bend path

7

No new posts Attachment(s) Using Custom Font Faux 3D with text layers

2



* Login  



Powered by phpBB3 © phpBB Group