[Gimp-user] Anyway to add multiple Guides at once?
David Gowers
00ai99 at gmail.com
Wed May 27 03:09:23 PDT 2009
On Wed, May 27, 2009 at 1:04 PM, DJ <delphitech at yahoo.com> wrote:
> Hi Gimp-user,
>
> Didn't see it in the manual, but was wondering if there is a
> short-cut to adding multiple Guides at once (ie., a comma-separated list)?
It seems difficult to imagine anything faster than the Gimp-python
console for this:
image = gimp.image_list()[0] # get the latest loaded image
for y in (10,20,60,80, 120, 140, 260, 280):
pdb.gimp_image_add_vguide (image, y)
It should be possible to make a Script-Fu which accepts a list of
coordinates (space separated) and does something similar to the loop
above.
However, I don't know how; I only know how to implement that in Python:
# assuming 'coords' is the string parameter containing space-separated
coordinates
realcoords = [int(v) for v in coords.split()]
for y in realcoords:
pdb.gimp_image_add_vguide (image, y)
Adding an option to choose between adding h and v guides should also be easy.
David
More information about the Gimp-user
mailing list