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

Scripting, toggles and accessing the application state

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.

8 of 8 messages available
Toggle history

Please log in to manage your subscriptions.

Scripting, toggles and accessing the application state John Smith 30 Sep 08:56
  Scripting, toggles and accessing the application state Rick Strong 30 Sep 11:54
   Scripting, toggles and accessing the application state Simon Budig 30 Sep 23:24
    Scripting, toggles and accessing the application state Rick Strong 01 Oct 12:58
   Scripting, toggles and accessing the application state John Smith 01 Oct 07:16
    Scripting, toggles and accessing the application state Ofnuts 01 Oct 08:19
    Scripting, toggles and accessing the application state Rick Strong 01 Oct 12:51
  Scripting, toggles and accessing the application state Ofnuts 30 Sep 23:46
John Smith
2016-09-30 08:56:09 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

Hello everybody,

I am considering moving from Photoshop to The Gimp entirely. I did bend Photoshop to my needs and I master perfectly everything I need to master with this software. I am NOT a beginner in the world of image editing.

Therefore, before starting the long and painful process of learning a new software, I need to be sure it is worth it.

Question 1) Can I add a layer mask, make it active, add some noise, blur the thing, get a selection from a previously saved alpha channel and all that sort of things through scripts. Don't tell me how, I just want to know if I can do it.

Question 2) Can I access the application state through scripts? I mean is it possible to know if a layer mask is already added to the active layer or if the layer palette is visible?

Question 3) As far as I understand it, it is not possible to have toggles at the moment. Ctrl z twice will cancel 2 actions instead of undoing and redoing the last action. Am I right?

Cordialement,

John

http://johnsmithimages.net

Rick Strong
2016-09-30 11:54:45 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

Ctrl + Z = Undo
Ctrl + Y = Redo
Hold down Ctrl and do a two-finger dance to toggle.

Rick S.

Question 3) As far as I understand it, it is not possible to have toggles at the moment. Ctrl z twice will cancel 2 actions instead of undoing and redoing the last action. Am I right?

Cordialement,

John

http://johnsmithimages.net

Simon Budig
2016-09-30 23:24:47 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

Rick Strong (rnstrong@primus.ca) wrote:

Ctrl + Z = Undo
Ctrl + Y = Redo
Hold down Ctrl and do a two-finger dance to toggle.

This is unfortunately not true for german kezboards...

Bye, Simon

simon@budig.de              http://simon.budig.de/
Ofnuts
2016-09-30 23:46:44 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

On 30/09/16 10:56, John Smith wrote:

Question 1) Can I add a layer mask, make it active, add some noise, blur the thing, get a selection from a previously saved alpha channel and all that sort of things through scripts. Don't tell me how, I just want to know if I can do it.

Yes

Question 2) Can I access the application state through scripts? I mean is it possible to know if a layer mask is already added to the active layer

Yes

or if the layer palette is visible?

No. Scripts have no direct control on the UI.

Question 3) As far as I understand it, it is not possible to have toggles at the moment. Ctrl z twice will cancel 2 actions instead of undoing and redoing the last action. Am I right?

There are parts of the UI that are toggles (for instance, Tab to show/hide dialogs, or Ctrl-T to show/hide the selection). It is normally useful to undo several steps in most applications, and I don't remember ever using an application where Ctrl-Z is a toggle as you describe (but there s no real standard for the "redo" shortcut)

You'll find there are two languages supported out of the box to write scripts: the historical script-fu (a LISP dialect), and Python. Unless you are already well versed in LISP/Scheme, use Python.

John Smith
2016-10-01 07:16:24 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

I answer on this thread, the other one (no subject) was another mistake of my part.

So as Jan said we aren't all that fluent in typing.

My personnal reason is that I used Photoshop for 21 years now and I consider that a program should yield to its users' needs and not the other way round.

For example I need a toggle when working on an image for which I have a sketch. Sometimes I need to show the layer with the sketch, then hide it then show it then hide it to see what is on the sketch that I lost on the image I built. Pressing F8 repetitively in very rapid strokes generally do the trick. Don' forget to half close your eyes as well

Ofnuts
2016-10-01 08:19:04 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

On 01/10/16 09:16, John Smith wrote:

I answer on this thread, the other one (no subject) was another mistake of my part.

So as Jan said we aren't all that fluent in typing.

My personnal reason is that I used Photoshop for 21 years now and I consider that a program should yield to its users' needs and not the other way round.

To some extent...; You can't take Excel and require it behaves like Photoshop. A program also has its own "philosophy", the more you stick to it, the happier you are. As they says the hard part is not learning Gimp, it's unlearning Photoshop.

For example I need a toggle when working on an image for which I have a sketch. Sometimes I need to show the layer with the sketch, then hide it then show it then hide it to see what is on the sketch that I lost on the image I built. Pressing F8 repetitively in very rapid strokes generally do the trick. Don' forget to half close your eyes as well

Rick Strong
2016-10-01 12:51:38 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

I understand the technique having used Photoshop for 27 years. I have scripted Indesign, Pagemaker, Corel draw (made it draw pie charts with callouts from a simple list of data), Word, Excel. It was fun but the time I spent debugging was better put to use using the other side of my brain and being creative.

That’s just me.

Sans souci, Rick

From: John Smith
Sent: Saturday, October 01, 2016 3:16 AM To: Rick Strong
Cc: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] Scripting, toggles and accessing the application state

I answer on this thread, the other one (no subject) was another mistake of my part.

So as Jan said we aren't all that fluent in typing.

My personnal reason is that I used Photoshop for 21 years now and I consider that a program should yield to its users' needs and not the other way round.

For example I need a toggle when working on an image for which I have a sketch. Sometimes I need to show the layer with the sketch, then hide it then show it then hide it to see what is on the sketch that I lost on the image I built. Pressing F8 repetitively in very rapid strokes generally do the trick. Don' forget to half close your eyes as well

Rick Strong
2016-10-01 12:58:36 UTC (about 8 years ago)

Scripting, toggles and accessing the application state

Another approach is to duplicate the layer you are working on and put it above the original layer. Turning the dupe layer on/off will reveal the changes.

Rick

-----Original Message----- From: Simon Budig
Sent: Friday, September 30, 2016 7:24 PM To: gimp-user-list@gnome.org
Subject: Re: [Gimp-user] Scripting, toggles and accessing the application state

Rick Strong (rnstrong@primus.ca) wrote:

Ctrl + Z = Undo
Ctrl + Y = Redo
Hold down Ctrl and do a two-finger dance to toggle.

This is unfortunately not true for german kezboards...

Bye, Simon

simon@budig.de              http://simon.budig.de/