It is currently Wed Apr 24, 2024 2:11 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 5 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: 3975
Location: 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.

_________________
TinT


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: 4739
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 subject: Re: AIMS? Selecting Points from withing a plugin...
PostPosted: Fri Dec 01, 2017 5:41 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
ofnuts wrote:
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.


As stated by ofnuts, that is the technique I have used in the past. Have the user create a path then have a path selection as the input.

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Selecting outline of image

2

No new posts Attachment(s) Points of Interest Work Flow

1

No new posts fuzzy select not fully selecting

4

No new posts Attachment(s) | Solved ] Move points on gradients

2

No new posts Convert a selection into an array of coordinates/points

2



* Login  



Powered by phpBB3 © phpBB Group