RSS/Atom feed Twitter
Site is read-only, email is disabled

How to change the active current tool from aplugin?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

7 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

How to change the active current tool from a plugin? Laurent gauvrit 25 Apr 22:27
  How to change the active current tool from a plugin? Sven Neumann 25 Apr 22:57
  How to change the active current tool from a plugin? Joao S. O. Bueno Calligaris 25 Apr 22:58
How to change the active current tool from a plugin? Laurent gauvrit 25 Apr 23:09
  How to change the active current tool from a plugin? Sven Neumann 25 Apr 23:25
   How to change the active current tool from aplugin? Laurent gauvrit 26 Apr 12:18
How to change the active current tool from aplugin? William Skaggs 26 Apr 17:55
Laurent gauvrit
2007-04-25 22:27:23 UTC (about 17 years ago)

How to change the active current tool from a plugin?

hello everybody,

I work on a hopefull edge detection plugin for gimp and i need to change the active current tool by a button in my plugin.

Anyone know the answer???

thanks

lolo

__________________

Sven Neumann
2007-04-25 22:57:20 UTC (about 17 years ago)

How to change the active current tool from a plugin?

Hi,

On Wed, 2007-04-25 at 20:27 +0000, Laurent gauvrit wrote:

I work on a hopefull edge detection plugin for gimp and i need to change the active current tool by a button in my plugin.

Sorry, but you can't control the core UI from a plug-in.

Sven

Joao S. O. Bueno Calligaris
2007-04-25 22:58:33 UTC (about 17 years ago)

How to change the active current tool from a plugin?

On Wednesday 25 April 2007 17:27, Laurent gauvrit wrote:

hello everybody,

I work on a hopefull edge detection plugin for gimp and i need to change the active current tool by a button in my plugin.

Anyone know the answer???

Yes.

The answer is: it is not possible at the moment. Sorry for that.

A plug-in can itself use the tools, , but it can't change most things in the UI context.

js
->

thanks

lolo

__________________

Laurent gauvrit
2007-04-25 23:09:28 UTC (about 17 years ago)

How to change the active current tool from a plugin?

I am a little worried about what you said. I can change colors with gimp_context_set_default_colors (void); (and it works) but I don't manage to use the gimp_context_set_paint_method (const gchar *name); method. I tried this code gimp_context_set_paint_method("gimp-paintbrush");

If I can't change the paint method from my plugin, what is the aim of those methods ?

__________________

Sven Neumann
2007-04-25 23:25:04 UTC (about 17 years ago)

How to change the active current tool from a plugin?

Hi,

On Wed, 2007-04-25 at 21:09 +0000, Laurent gauvrit wrote:

I am a little worried about what you said. I can change colors with gimp_context_set_default_colors (void); (and it works) but I don't manage to use the gimp_context_set_paint_method (const gchar *name); method. I tried this code gimp_context_set_paint_method("gimp-paintbrush");

You can change the context that your plug-in is running in. By default that's the user context but that's just for historical reasons. Actually you are supposed to use gimp_context_push() before you use any methods that alter the context.

If I can't change the paint method from my plugin, what is the aim of those methods ?

The paint-method is not reflected anywhere in the UI. It only affects paint operations done through the PDB.

May I ask why you want to change the tool from your plug-in? That doesn't sound like something a plug-in should be doing and I am curious as to why you think that it would be useful to be able to do that.

Sven

Laurent gauvrit
2007-04-26 12:18:08 UTC (about 17 years ago)

How to change the active current tool from aplugin?

Sven you look like a hardworker, thank you so much for answer so quikly! That I told I try to design an edge detection plugin. This plugin helps the user to select an objet on a picture. In first the user select one algorithm (like Sobel for example), next the plugin will create 3 layers: -a copy of the picture to enable the user to fill gaps that block the edge detection
-a white picture where the result of the algorithme appears -a flag layer where the user can draw "in" area and "out" area

the most is done, only the flag must be finish. I would provide flag 's buttons in my plugin that: -select automaticly the flag layer (ok no problem) -active the paint brush tool (the problem!) -select apropriate color(green for "in" area and red for "ou" area)(an another problem)

if you have any secrets gimps tips for help me it'll be wellcome

__________________

William Skaggs
2007-04-26 17:55:16 UTC (about 17 years ago)

How to change the active current tool from aplugin?

From: "Laurent gauvrit"

That I told I try to design an edge detection plugin. This plugin helps the user to select an objet on a picture. [ . . . ]

Hi Laurent,

In the GIMP architecture, things that require the user to interact directly with an image, by painting or any other use of the mouse, must be implemented as tools (in the core) instead of plug-ins. You could look at the code for the new Foreground Select tool, which seems to have some things in common with the tool you are trying to create.

There has been some talk of pluggable tools, but this is currently an idea for the future.

Best wishes,

-- Bill

______________ ______________ ______________ ______________ Sent via the CNPRC Email system at primate.ucdavis.edu