Ask all general Gimp related questions here
Post a reply

Gimp library of simple script commands?

Thu Jun 19, 2014 6:40 pm

GIMP Version: 2.8.10
Operating System: Windows
GIMP Experience: Intermediate Level



Is there a gimp library where I could find simple single script commands, so I could piece some together, and make a script?

Such as a script command to:
* duplicate a layer.
* change the layer mode.
* rotate a layer.

And other simple commands.

I have tried looking at existing scripts but the lines seem to run together (at least in my head, lol) , and I get confused. :(

Re: Gimp library of simple script commands?

Thu Jun 19, 2014 6:57 pm

Greetings!

I would suggest starting with the links in this thread: Script Writing Resources For GIMP. Have a look at the links to Fencepost's Script Writing Tutorials, which are included in that thread.

If you have any questions, just ask and our members will be happy to assist.

Re: Gimp library of simple script commands?

Thu Jun 19, 2014 7:22 pm

Hi Grits there is always help available here for how to set up commands for any of the plugins or tools gimps scripts can access.
and once you start its quite easy

Re: Gimp library of simple script commands?

Thu Jun 19, 2014 10:32 pm

Thanks GnuTux and Graechen. I will check out the resources, and probably be asking some questions here.

Re: Gimp library of simple script commands?

Fri Jun 20, 2014 7:49 am

You should find this out by reading the information already provided, but for a quick look at the commands available, go to...
Help > Procedure Browser
With that information and looking over an existing similar script to what you want to build, you should be able to grasp the basic concept of how everything works.
Good Luck! :)

Re: Gimp library of simple script commands?

Fri Jun 20, 2014 10:56 am

I always recommend Monsunamis script lessons. Start here.
www.youtube.com Video from : www.youtube.com
:)

Re: Gimp library of simple script commands?

Fri Jun 20, 2014 1:11 pm

Grits wrote:Such as a script command to:
* duplicate a layer.
(define new-layer (car (gimp-layer-copy orig-layer TRUE))) ; should use a 'let' variable rather than 'define'
Grits wrote:* change the layer mode.
(gimp-layer-set-mode new-layer SCREEN-MODE) ; see PDB Browser for available layer modes
Grits wrote:* rotate a layer.
(gimp-item-transform-rotate new-layer (* angle (/ *pi* 180)) TRUE 0 0) ; angle should be in degrees

Grits wrote:And other simple commands.
The PDB Browser is your friend (either "Help->Procedure Browser" or use the "Browse" button in the Script-fu console).

If you can't find what you need in the PDB Browser or don't understand how to use the information, feel free to ask.

Re: Gimp library of simple script commands?

Sat Jun 21, 2014 12:36 am

Rod wrote:I always recommend Monsunamis script lessons. Start here.
www.youtube.com Video from : www.youtube.com
:)



Thanks Rod! I will take a look this weekend.

Re: Gimp library of simple script commands?

Sat Jun 21, 2014 12:38 am

saulgoode wrote:
Grits wrote:And other simple commands.
The PDB Browser is your friend (either "Help->Procedure Browser" or use the "Browse" button in the Script-fu console).

If you can't find what you need in the PDB Browser or don't understand how to use the information, feel free to ask.


Thanks! That certainly helped me understand the console better.

Re: Gimp library of simple script commands?

Sat Jun 21, 2014 4:14 am

Grits wrote:
Rod wrote:I always recommend Monsunamis script lessons. Start here.
www.youtube.com Video from : www.youtube.com
:)



Thanks Rod! I will take a look this weekend.


If you have to learn either Scheme or Python, go for Python:
- In Gimp, Python can do a lot more things
- Python has plenty of uses outside of Gimp
- Python is generally considered easier to learn

The only merit of Scheme is that it used to be the only standard script language for Gimp, but since 2.8 Python is standard, too.

Re: Gimp library of simple script commands?

Sun Jul 06, 2014 8:56 pm

Thanks a lot, ofnuts. I think scheme is over my head. Maybe python will be easier for me.
Post a reply