POV-Ray : Newsgroups : povray.off-topic : GIMP hotkeys/ scripts/ user-defined functions? Server Time
5 Nov 2024 16:42:20 EST (-0500)
  GIMP hotkeys/ scripts/ user-defined functions? (Message 1 to 10 of 80)  
Goto Latest 10 Messages Next 10 Messages >>>
From: gregjohn
Subject: GIMP hotkeys/ scripts/ user-defined functions?
Date: 9 Dec 2008 14:45:00
Message: <web.493eca1c9721420e30bf98980@news.povray.org>
Hello. I'm interested in inserting a certain operation into GIMP (resize to X
pixels).  I'm sure I could figure out the way to achieve this functionality if
I knew GIMP's terminology for such.

Can someone educate me on what GIMP calls this kind of thing, if it were to have
it?


Post a reply to this message

From: nemesis
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 9 Dec 2008 16:20:05
Message: <493ee105@news.povray.org>
gregjohn escreveu:
> Hello. I'm interested in inserting a certain operation into GIMP (resize to X
> pixels).  I'm sure I could figure out the way to achieve this functionality if
> I knew GIMP's terminology for such.
> 
> Can someone educate me on what GIMP calls this kind of thing, if it were to have
> it?

You can try Filters -> Script-Fu -> Console.  I think all of Gimp's API 
is available in this way.  It has a very handy procedure browser, with 
documentation and a search box.  For instance, searching for resi 
already gives 2 functions for image resizing and 2 for layer resizing.

It's Gimp's default scripting language, a TinyScheme interpreter.  Don't 
  feel terrified, Scheme is a very easy language and in any case you'll 
be using it just to call functions.  Syntax is simple:  (function-name 
par1 par2 par3 ...).  That's it, the name of the function is the first 
thing in the procedure call and it comes inside the parentheses.

Hope that helps.


Post a reply to this message

From: Mueen Nawaz
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 9 Dec 2008 19:04:35
Message: <493f0793$1@news.povray.org>
nemesis wrote:
> It's Gimp's default scripting language, a TinyScheme interpreter.  Don't
>  feel terrified, Scheme is a very easy language and in any case you'll
> be using it just to call functions.  Syntax is simple:  (function-name
> par1 par2 par3 ...).  That's it, the name of the function is the first
> thing in the procedure call and it comes inside the parentheses.

	Also, Gimp has supported scripting via Python for a long time now, and
I heard that they consider it the official scripting language now.

-- 
It's not hard to meet expenses, they're everywhere.


                    /\  /\               /\  /
                   /  \/  \ u e e n     /  \/  a w a z
                       >>>>>>mue### [at] nawazorg<<<<<<
                                   anl


Post a reply to this message

From: nemesis
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 9 Dec 2008 20:12:43
Message: <493f178b$1@news.povray.org>
Mueen Nawaz wrote:
> nemesis wrote:
>> It's Gimp's default scripting language, a TinyScheme interpreter.  Don't
>>  feel terrified, Scheme is a very easy language and in any case you'll
>> be using it just to call functions.  Syntax is simple:  (function-name
>> par1 par2 par3 ...).  That's it, the name of the function is the first
>> thing in the procedure call and it comes inside the parentheses.
> 
> 	Also, Gimp has supported scripting via Python for a long time now, and
> I heard that they consider it the official scripting language now.

It's truly irrelevant the choice of language when all you really do is 
just call procedures.

But anyway, Script-Fu is TinyScript and comes builtin with Gimp because 
it's a really small and lightweight interpreter.  I didn't see any 
Python-Fu in the Win build, though it's here in my Ubuntu Gimp.


Post a reply to this message

From: Mike Raiford
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 08:32:19
Message: <493fc4e3@news.povray.org>
nemesis wrote:

> But anyway, Script-Fu is TinyScript and comes builtin with Gimp because 
> it's a really small and lightweight interpreter.  I didn't see any 
> Python-Fu in the Win build, though it's here in my Ubuntu Gimp.

Didn't Gimp use some form of Lisp at some point? I remember it being a 
PITA to write a simple macro...
-- 
~Mike


Post a reply to this message

From: nemesis
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 09:38:23
Message: <493fd45f$1@news.povray.org>
Mike Raiford escreveu:
> nemesis wrote:
> 
>> But anyway, Script-Fu is TinyScript and comes builtin with Gimp 
>> because it's a really small and lightweight interpreter.  I didn't see 
>> any Python-Fu in the Win build, though it's here in my Ubuntu Gimp.
> 
> Didn't Gimp use some form of Lisp at some point? I remember it being a 
> PITA to write a simple macro...

Sorry, I wrote it wrong the second time:  it's TinyScheme, not TinyScript.

Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd be 
such a PITA. :)


Post a reply to this message

From: Mike Raiford
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 09:50:30
Message: <493fd736$1@news.povray.org>
nemesis wrote:

> Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd be 
> such a PITA. :)

Something about dozens of parenthesis...
-- 
~Mike


Post a reply to this message

From: Invisible
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 10:02:38
Message: <493fda0e$1@news.povray.org>
>> Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd 
>> be such a PITA. :)
> 
> Something about dozens of parenthesis...

(if (= 1 x) (lambda (n) (1)) (lambda (n) (+ 1 n)))


Post a reply to this message

From: nemesis
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 10:18:44
Message: <493fddd4@news.povray.org>
Mike Raiford escreveu:
> nemesis wrote:
> 
>> Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd 
>> be such a PITA. :)
> 
> Something about dozens of parenthesis...

Most of it are procedure calls and would need parentheses in most 
languages anyway.  At least, no colons between parameters are needed. ;)


Post a reply to this message

From: nemesis
Subject: Re: GIMP hotkeys/ scripts/ user-defined functions?
Date: 10 Dec 2008 10:23:39
Message: <493fdefb$1@news.povray.org>
Invisible escreveu:
>>> Yes, Scheme is a Lisp dialect.  No, I quite don't understand why it'd 
>>> be such a PITA. :)
>>
>> Something about dozens of parenthesis...
> 
> (if (= 1 x) (lambda (n) (1)) (lambda (n) (+ 1 n)))

I don't really think someone scripting Gimp needs lambdas.  And your 
first lambda will fail because 1 is not a function, but you've put it in 
calling context as the first element of a list.

Other than that, "if" is as straightforward as in any language.

(if condition
   this
   that)

or just
(if condition this)

Actually, the "if-then-else" statement was born in Lisp.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.