It is currently Sat Apr 20, 2024 7:10 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Mon Sep 19, 2016 8:36 am  (#21) 
Offline
GimpChat Member

Joined: Sep 13, 2016
Posts: 137
It does not do anything yet, because I need to know WHAT you exactly wish tod do!

E.g. two (or three??) horizontal guides two (or more) vertical guides and then select all rectangles inbetween(??? or ???) and select them and what next? stroke them black? or ???

So the wish is for a mathematician totally undecided ... exact wish is needed ;)

EDIT:
Because my way lets the guide-lab live one could say: select and stroke always the first upper middel rectangle ... deleting is easy so other rectangles could become the most upper left rectangle to stroke.
But maybe you would like to stroke (with what) all only the upper ones etc

Hope it is now clear what I want to know :yes


Top
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Mon Sep 19, 2016 10:26 am  (#22) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
PKHG wrote:
It does not do anything yet, because I need to know WHAT you exactly wish tod do!

E.g. two (or three??) horizontal guides two (or more) vertical guides and then select all rectangles inbetween(??? or ???) and select them and what next? stroke them black? or ???

So the wish is for a mathematician totally undecided ... exact wish is needed ;)

EDIT:
Because my way lets the guide-lab live one could say: select and stroke always the first upper middel rectangle ... deleting is easy so other rectangles could become the most upper left rectangle to stroke.
But maybe you would like to stroke (with what) all only the upper ones etc

Hope it is now clear what I want to know :yes

I got ya! Actually I want to stroke all the guides at once. Tran wrote one in scheme (script-fu) already but a Python filter would be handy also.

_________________
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: Python or Scheme script request (selection from guides)
PostPosted: Mon Sep 19, 2016 4:01 pm  (#23) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Now exists in python but a little more advanced.
It composes the path out of shorter line segments that meet at intersections so that you can easily edit/delete line sections from created path.

Now in Python (Guides to path).

_________________
TinT


Top
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Mon Sep 19, 2016 6:16 pm  (#24) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4045
Tin, you are AWESOME!

LOL! Is anybody polishing up Tin's Golden Wilbur?

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


Top
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Mon Sep 19, 2016 6:20 pm  (#25) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
mahvin wrote:
Is anybody polishing up Tin's Golden Wilbur?

:hehe

_________________
TinT


Top
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Tue Sep 20, 2016 7:11 pm  (#26) 
Offline
GimpChat Member
User avatar

Joined: Dec 26, 2014
Posts: 198
Rod wrote:
I wonder if you could actually write a script that creates a selection from user placed guides?

1) User creates a grid of guides. Then runs the filter.
2) The filter creates a selection from those guides and a path from that selection. The user could then stroke the path as they see fit. Or stroke the selection. Or perhaps the filter could allow a toggle for either choice?

An interesting idea, which I couldn’t get out of my mind wondering if it could be done. I got the selection from guides working then gave up on it, as I agree with ofnuts that it’s a roundabout way of doing things. I’ve uploaded the script here for anyone curious
Attachment:
oo-guides-to-selection-mk2.scm [2.53 KiB]
Downloaded 115 times

Located at <Image>/Script-Fu/Guides to selection

It is an unfinished script with no error checking and will crash or can give odd results if the user doesn’t

Add 4 guides, must be 2 vertical and 2 horizontal (the order of placement doesn’t matter)

Run the script

Repeat x number of times

Path to selection
Stroke path

PS You may need to Re-start gimp and have only one image open before using

Attachment:
guide2path2selection.jpg
guide2path2selection.jpg [ 667.98 KiB | Viewed 1366 times ]


Top
 Post subject: Re: Python or Scheme script request (selection from guides)
PostPosted: Wed Sep 21, 2016 9:34 am  (#27) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
I created this SVG Gradient for GIMP using my Notepad ++ editor. I named it (SVG Blinds)

Image

1) install the gradient attached into your gradient folder.
Attachment:
SVG Blinds.zip [393 Bytes]
Downloaded 94 times

2) Open a new image and refresh your gradients :refresh
3) In the gradients dialog, select SVG Blinds from the list.
4) In tool options select conical (sym) for shape and NONE for repeat.
5) Drag the gradient from center of image layer to an outer corner.

_________________
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: Python or Scheme script request (selection from guides)
PostPosted: Wed Sep 21, 2016 9:58 am  (#28) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Steve wrote:
Rod wrote:
I wonder if you could actually write a script that creates a selection from user placed guides?

1) User creates a grid of guides. Then runs the filter.
2) The filter creates a selection from those guides and a path from that selection. The user could then stroke the path as they see fit. Or stroke the selection. Or perhaps the filter could allow a toggle for either choice?

An interesting idea, which I couldn’t get out of my mind wondering if it could be done. I got the selection from guides working then gave up on it, as I agree with ofnuts that it’s a roundabout way of doing things. I’ve uploaded the script here for anyone curious
Attachment:
oo-guides-to-selection-mk2.scm

Located at <Image>/Script-Fu/Guides to selection

It is an unfinished script with no error checking and will crash or can give odd results if the user doesn’t

Add 4 guides, must be 2 vertical and 2 horizontal (the order of placement doesn’t matter)

Run the script

Repeat x number of times

Path to selection
Stroke path

PS You may need to Re-start gimp and have only one image open before using

Attachment:
guide2path2selection.jpg


Excellent script also! :bigthup Thanks.

_________________
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  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Guides from selection

2

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

121

No new posts Attachment(s) Script request

3

No new posts Attachment(s) Is there a script for doing Stroke outside selection?

4

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

3



* Login  



Powered by phpBB3 © phpBB Group