Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Re: Python or Scheme script request (selection from guides)

Mon Sep 19, 2016 8:36 am

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

Re: Python or Scheme script request (selection from guides)

Mon Sep 19, 2016 10:26 am

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.

Re: Python or Scheme script request (selection from guides)

Mon Sep 19, 2016 4:01 pm

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).

Re: Python or Scheme script request (selection from guides)

Mon Sep 19, 2016 6:16 pm

Tin, you are AWESOME!

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

Re: Python or Scheme script request (selection from guides)

Mon Sep 19, 2016 6:20 pm

mahvin wrote:Is anybody polishing up Tin's Golden Wilbur?

:hehe

Re: Python or Scheme script request (selection from guides)

Tue Sep 20, 2016 7:11 pm

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
oo-guides-to-selection-mk2.scm
(2.53 KiB) Downloaded 119 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

guide2path2selection.jpg
guide2path2selection.jpg (667.98 KiB) Viewed 1475 times

Re: Python or Scheme script request (selection from guides)

Wed Sep 21, 2016 9:34 am

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.
SVG Blinds.zip
(393 Bytes) Downloaded 99 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.

Re: Python or Scheme script request (selection from guides)

Wed Sep 21, 2016 9:58 am

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
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

guide2path2selection.jpg


Excellent script also! :bigthup Thanks.
Post a reply