Post Reply 

Polygon selection in script

May 20, 2014, 02:17
Post: #1
Polygon selection in script
Hello all- I am writing a short script that calls python-fu-heal-selection. It works when I call the rectangle selection script, like:

Code:
(gimp-image-select-rectangle     image CHANNEL-OP-ADD     0 0 50 50)

However when I instead call..
Code:
(path-points (list->vector points)
(gimp-image-select-polygon     image CHANNEL-OP-ADD  point_count     path-points)
(variable point_count and points are both passed into the script)

I get the message:
"Heal selection-Warning: You must first select a region to heal."
So I must have a flaw in my call to gimp-image-select-polygon, right?

My batch file:
Code:
"C:\\Program Files\\GIMP 2\\bin\\gimp-console-2.8" --verbose -d -i -b "(myScript '(0 0 0 50 50 50 50 0 0 0) 5)"

(The polygon should be a self-connecting square)
If anyone could point out what I'm doing wrong, I'd appreciate it. (full script attached)


Attached File(s)
.txt  bad polygon select.txt (Size: 735 bytes / Downloads: 67)
Find all posts by this user
Quote this message in a reply
May 21, 2014, 00:30
Post: #2
RE: Polygon selection in script
Thanks very much! It was my point count that was off.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Vector input for polygon selection ss32 1 62 Feb 11, 2018 20:59
Last Post: paynekj
  Heal Selection / Resynthesizer Errors jitblass 1 555 Nov 7, 2017 13:56
Last Post: paynekj
  Request for script chlebna 1 290 Sep 13, 2017 09:35
Last Post: ythgilb
  Request for script - Guillotine + Watermark sunslick 1 365 Sep 4, 2017 08:51
Last Post: ythgilb
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholom√§us 1 404 Aug 31, 2017 14:32
Last Post: Bertholomäus

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS