It is currently Thu Jul 04, 2024 5:16 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Tue Sep 20, 2016 1:32 am  (#21) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13068
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
trandoductin wrote:
I never remember them for sure, i always have to go back to programming if then statements... if something happens then something happens...anything else it's than... that's how i have to go about it..i don't know how i would remember them if i didn't use "if ... then" statements in programming.

I don't care how you do what you do.
As long as you keep on doing what it is you've been doing,
that you do so well. :puzzled
:hehe

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


Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Tue Sep 20, 2016 5:44 am  (#22) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Yes "Than" is the correct spelling for that sentence. :) This is why the English language is so confusing to learn. :lol .
Peace and Piece
Than and Then
Too, and To
Their and There
Witch and Which
So and Sew (there is also Sow)
Shoe and Shew
The list seems endless. :gaah :hoh


This python filter is awesome Tran. Thank you very much.

_________________
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: Guides to Path (scheme script, now python script more advanced).
PostPosted: Wed Sep 21, 2016 4:37 am  (#23) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
trandoductin wrote:
This script is spawned from Rod's thread/request

Rel 2. works on selection bounding box/rectangle. (USE .py instead of .scm).
Attachment:
guides_to_path.scm


REMOVE .scm above,
Use the .py below it's more advanced (registered under same location)
Release 1.
Attachment:
guides_to_path.zip


.py features composing sections so that you can easily edit the path.
(as requested by mahvin)
(also defaulting the path to visible requested by Obinbc).
[ Image ]

Will be available under /Image/Guides/Guides to path
[ Image ]

If there is no selection all guides will turn into path.
If there is a selection, guides within the selection bounding (box/rectangle) will turn into path.

[ Image ]


Hi, suggestion add an boolean to either stroke at once or not with brush and foreground
if ....
pdb.gimp_edit_stroke_vectors(image.layers[0],new_vectors)

works ;-)
greets
Peter


Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Wed Sep 21, 2016 9:05 am  (#24) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
PKHG wrote:
pdb.gimp_edit_stroke_vectors(image.layers[0],new_vectors)

works ;-)

<personaltaste>
Stroking a path with a brush is never very clean. There is unfortunately no API to stroke a path in "line" mode, which looks a lot better. And adding the choice to a script is just replacing the use of Edit>Stroke path by the selection of the option.
</personaltaste>

_________________
Image


Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Wed Sep 21, 2016 9:55 am  (#25) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
ofnuts wrote:
PKHG wrote:
pdb.gimp_edit_stroke_vectors(image.layers[0],new_vectors)

works ;-)

<personaltaste>
Stroking a path with a brush is never very clean. There is unfortunately no API to stroke a path in "line" mode, which looks a lot better. And adding the choice to a script is just replacing the use of Edit>Stroke path by the selection of the option.
</personaltaste>


They could just right click the Path they want stroked and vectorize it

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Wed Sep 21, 2016 11:06 am  (#26) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
ofnuts wrote:
PKHG wrote:
pdb.gimp_edit_stroke_vectors(image.layers[0],new_vectors)

works ;-)

<personaltaste>
Stroking a path with a brush is never very clean. There is unfortunately no API to stroke a path in "line" mode, which looks a lot better. And adding the choice to a script is just replacing the use of Edit>Stroke path by the selection of the option.
</personaltaste>

I strongly agree... plus if i added the option to stroke path, it wouldn't be "Guides To Path" anymore which i think is a good function on its own right now.

My personal choice is that if the stroking of a path is needed as part of a process for a script, like stroke path then doing something else with it, then I'll look into making that work (previously I had to resort to some other hacks that i found online that uses .svg to stroke path). But in this case it's just a step that's added onto the end of an isolated function "Guides To Path" I don't see the point for it. I think it's better to let user do it themselves they have more options to play with anyways.

_________________
TinT


Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Wed Sep 21, 2016 11:14 am  (#27) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
trandoductin wrote:
ofnuts wrote:
PKHG wrote:
pdb.gimp_edit_stroke_vectors(image.layers[0],new_vectors)

works ;-)

<personaltaste>
Stroking a path with a brush is never very clean. There is unfortunately no API to stroke a path in "line" mode, which looks a lot better. And adding the choice to a script is just replacing the use of Edit>Stroke path by the selection of the option.
</personaltaste>

I strongly agree... plus if i added the option to stroke path, it wouldn't be "Guides To Path" anymore which i think is a good function on its own right now.

I like it just the way it is now. :)

_________________
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: Guides to Path (scheme script, now python script more advanced).
PostPosted: Sat Oct 01, 2016 9:45 am  (#28) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
Tranductim,
Looked up your guides-to-path script.

I realized that is creates order m * n vectors (so to say if n = m, its quadratic in time usage)

I used your script to make it order (m + n) , only total length vectors created ...
Measuring time shows indeed time advantage ...

Interested in the so to say 1.1 version of you and me?

Peter

EDIT: just discovered, small error in my script, if there is e.g. only one guide ;-(, to be repaired !

EDIT EDIT: Repaired :yes


Last edited by PKHG on Sun Oct 02, 2016 4:10 am, edited 1 time in total.

Top
 Post subject: Re: Guides to Path (scheme script, now python script more advanced).
PostPosted: Sat Oct 01, 2016 9:52 am  (#29) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 4003
Location: Canada
How did you manage that,
does it still produce lines that meet at intersection points?
if so, yes i would be very interested.

_________________
TinT


Top
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Falling snow animated Scheme Script for Gimp

121

No new posts .py script not showing under Python-Fu

3

No new posts Attachment(s) Learning to do first Python script

6

No new posts Attachment(s) My first Python Script for Gimp

7

No new posts Does anyone have script fu and python plugins that work on 2.99.19?

1



* Login  



Powered by phpBB3 © phpBB Group