Re: [Gimp-user] Controlling the interface through scripts



On 25/09/16 08:47, John Smith wrote:
Hello everybody,


I am considering moving from Photoshop to The Gimp entirely.

I found answers for most of my concerns but there is still one point that
worries me.


Am I able to write scripts doing something like below.

if (keypressed=f7)

{

if(layerpalette.isVisible){

layerpalette.hide

}else(layerpalette.show)

}

I mean can I access the interface and control it through scripts? The idea
of the “script” above is to build a toggle to hide and show the layer
palette by pressing the f7 key.

The script and plug-ins do not control the user interface (and IMHO this is a good thing). However you can assign a keyboard shortcut to show the Layers list (Ctrl-L by default) and the Tab key will hide all dialogs.

The script and plug-ins do not control the user interface (and IMHO this is a good thing).to write a script
Another example:

if(keypressed=f3){if(activelayer.layermask.exists){activelayer.layermask.select}else{activelayer.layermask.add}
}

If the f3 key is pressed, if there is a layer mask on the active layer it
should be activated and if not an empty layer mask should be added and
activated.


Is it possible to do things like that with the Gimp 2.8x?

Cordialement,

John

You can define a keyboard shortcut to elicit the Layer Mask creation dialog. If you want a mask with a specific initial value, you have to write a script (and assign it to a shortcut). You can also define a shortcut to toggle editing between mask and layer, but that will be a different key.

As they say, the tough thing with Gimp is not learning Gimp, but unlearning Photoshop.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]