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

change active tool from script

This discussion is connected to the gimp-user-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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

change active tool from script Ryan Krauss 20 May 01:52
  change active tool from script David Gowers 20 May 02:08
Ryan Krauss
2009-05-20 01:52:50 UTC (over 15 years ago)

change active tool from script

I would like to be able to easily toggle between the Paintbrush with brush Circle (05) and an Eraser with brush Circle (17). I want to write one script for each and bind them to keys I can use to make this switch quickly. I have found the commands to set the brushes to either Circle (05) and Circle (17) and have written that part of each script and bound them to Alt-1 and Alt-2, so I can quickly change between the two brush radii, but I can't seem to find script fu commands to set the active tool to either Eraser or Paintbrush. Is there a way to do that from a script?

Thanks,

Ryan

David Gowers
2009-05-20 02:08:51 UTC (over 15 years ago)

change active tool from script

Hi Ryan,

On Wed, May 20, 2009 at 9:22 AM, Ryan Krauss wrote:

I would like to be able to easily toggle between the Paintbrush with brush Circle (05) and an Eraser with brush Circle (17).  I want to write one script for each and bind them to keys I can use to make this switch quickly.   I have found the commands to set the brushes to either Circle (05) and Circle (17) and have written that part of each script and bound them to Alt-1 and Alt-2, so I can quickly change between the two brush radii, but I can't seem to find script fu commands to set the active tool to either Eraser or Paintbrush.  Is there a way to do that from a script?

No (and AFAICS, there will never be -- it has too much potential to confuse the user and introduce race conditions.) I was going to mention you could use xdotool to trigger the keyboard shortcuts for Eraser or Paintbrush,
but actually you can't (not in Script-Fu; I always use Python to write my GIMP plugins, and I can shell out to xdotool easily enough in Python)

David