It is currently Thu Nov 23, 2017 2:42 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: AIMS? Selecting Points from withing a plugin...
PostPosted: Fri Nov 10, 2017 5:07 pm  (#1) 
Offline
New Member

Joined: Nov 10, 2017
Posts: 2
AIMS: Am I Missing Something?

I'm a systems programmer new to GIMP code, so it's quite possible that I'm missing something obvious because I zipped along thinking I knew all I needed to know. I've written a plugin to do a simple transformation but currently the user must select a region with the poly select tool to define the transformation before calling the plugin. I'd much rather the user select the polygon from within the plugin, but I cannot for love nor money figure out how to do anything UI related from within a plugin! If this is by design, I'm curious to know why. If there is a way to select points from within a plugin I'd love to see how it's done!

I just feel it's more seemly to allow the user to define a transformation and have it apply only to a selection, as for the other image transformations and filters generally.

I appreciate anyone's attention to my little problem :)

Cheers


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: AIMS? Selecting Points from withing a plugin...
PostPosted: Fri Nov 10, 2017 10:08 pm  (#2) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 2884
Location: Tin from Victoria BC Canada
I don't think you can start a plugin and then user picks polygon.
All the scripts that i have written that had to do with selection always had the user select the selection first and then script runs.

_________________
T.
Image gimplearn.net                                                                           


Top
 Post subject: Re: AIMS? Selecting Points from withing a plugin...
PostPosted: Sun Nov 12, 2017 11:05 am  (#3) 
Offline
New Member

Joined: Nov 10, 2017
Posts: 2
I've re-written it as a C plugin using sample points to define the quadrialteral, but I'm still not very happy with not being able to select points from within the plugin. Does anyone know anything about how one might do this with libgimp?


Top
 Post subject: Re: AIMS? Selecting Points from withing a plugin...
PostPosted: Mon Nov 13, 2017 7:26 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 3694
Plugin cannot interact directly with the Canvas/UI, only "Tools" can, but there is no plugin mechanism for add your tools.

What you can do is require a path. You can extract a collection of points from it, and this doesn't force the user the create a selection. It is also easier to adjust than a polygon selection in case your plugin did't produce the expected result.

_________________
Image


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Script and Plugin Menu Placement Points for script-fu and python-fu

8

No new posts Attachment(s) Trouble with selecting image

2

No new posts Selecting text in a layer

6

No new posts Attachment(s) How to add points to curves...

9

No new posts Action for quickly selecting themes

2



* Login  



Powered by phpBB3 © phpBB Group