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

script-fu documentation

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

9 of 9 messages available
Toggle history

Please log in to manage your subscriptions.

script-fu documentation Tomasz Grobelny 19 Jan 23:35
  script-fu documentation Kevin Cozens 20 Jan 02:09
   script-fu documentation Campbell Barton 19 Jan 21:21
    script-fu documentation Kevin Cozens 20 Jan 18:06
script-fu documentation shaneyfelt@juno.com 21 Jan 18:54
  script-fu documentation Campbell Barton 21 Jan 14:40
   script-fu documentation Kevin Cozens 23 Jan 18:23
  script-fu documentation Kevin Cozens 21 Jan 20:37
   script-fu documentation Sven Neumann 22 Jan 15:31
Campbell Barton
2005-01-19 21:21:10 UTC (over 19 years ago)

script-fu documentation

Will thge gimp move to tiny-fu compleately?

Kevin Cozens wrote:

Tomasz Grobelny wrote:

Where can I find a decent script-fu documentation? I mean a document where I can find most supported functions especially string manipulation functions (like split, chop, substring, find etc.). TIA

The Script-Fu plug-in of GIMP uses SIOD as its Scheme interpreter. The main site for information on SIOD is http://people.delphiforums.com/gjc/siod.html. Be aware that not all features of SIOD as listed at that site are available in GIMP. This is because G IMP uses an older version of the SIOD interpreter and doesn't use all of the C source files which are part of SIOD. IIRC, the features found in slibu.c are not available to be used in Script-Fu.

_______________________________________________ Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Tomasz Grobelny
2005-01-19 23:35:11 UTC (over 19 years ago)

script-fu documentation

Where can I find a decent script-fu documentation? I mean a document where I can find most supported functions especially string manipulation functions (like split, chop, substring, find etc.). TIA

Tomek

Kevin Cozens
2005-01-20 02:09:36 UTC (over 19 years ago)

script-fu documentation

Tomasz Grobelny wrote:

Where can I find a decent script-fu documentation? I mean a document where I can find most supported functions especially string manipulation functions (like split, chop, substring, find etc.). TIA

The Script-Fu plug-in of GIMP uses SIOD as its Scheme interpreter. The main site for information on SIOD is http://people.delphiforums.com/gjc/siod.html. Be aware that not all features of SIOD as listed at that site are available in GIMP. This is because G IMP uses an older version of the SIOD interpreter and doesn't use all of the C source files which are part of SIOD. IIRC, the features found in slibu.c are not available to be used in Script-Fu.

Kevin Cozens
2005-01-20 18:06:49 UTC (over 19 years ago)

script-fu documentation

Campbell Barton wrote:

Will thge gimp move to tiny-fu compleately?

I am not aware of any plans to replace Script-Fu with Tiny-Fu in the GIMP source tree. Although that might change now that I am about to start testing the Tiny-Fu changes which added UTF-8 support. If Script-Fu was pulled out as a separate module it would make it easier to let users/packagers choose which of the two Scheme-based plug-ins they wish to use. For now, the two will happily co-exist. It may be time to start a message thread about this with the recent branching of GIMP.

Campbell Barton
2005-01-21 14:40:30 UTC (over 19 years ago)

script-fu documentation

In my experience, being implimentation agnostic is not good- it can fragment the scripting community, Script X dosent work with Tiny fu but and VsVercer for other scripts ,...... you know, it just gets messy. Its best top keep to one, newbies will ask which to use and get confusticated answeres by opinionated experts.

Sounds like tinyfu is better and smalled, grerater development? Why not switch?

- Cam

PS, Im implying that scripting in the 2 script-fu ansd tiny fu isnt the same, if it is - then maby my arg dosent hold, tho in my expereince implimentations are useually diff.

shaneyfelt@juno.com wrote:

I would hope that if ScriptFu is pulled out, TinyFu will also provide an interpreter directly in GIMP's GUI that one can use interactively. (I haven't used TinyFu)... Perhaps the two interpreters could also co-exist as part of the normal build for one release, at least, while scripts get converted? Just a thought...

_-T

___________________________________________________________________ Speed up your surfing with Juno SpeedBand. Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

_______________________________________________ Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

shaneyfelt@juno.com
2005-01-21 18:54:16 UTC (over 19 years ago)

script-fu documentation

I would hope that if ScriptFu is pulled out, TinyFu will also provide an interpreter directly in GIMP's GUI that one can use interactively. (I haven't used TinyFu)... Perhaps the two interpreters could also co-exist as part of the normal build for one release, at least, while scripts get converted? Just a thought...

_-T

____________________

Kevin Cozens
2005-01-21 20:37:39 UTC (over 19 years ago)

script-fu documentation

shaneyfelt@juno.com wrote:

I would hope that if ScriptFu is pulled out, TinyFu will also provide an interpreter directly in GIMP's GUI that one can use interactively. (I haven't used TinyFu)...

Tiny-Fu was built using the framework of Script-Fu. It has all the main features of Script-Fu (except for the Browse button in Console mode) but users a Scheme interpreter which follows the standards more closely than the interpreter used in Script-Fu.

I would suggest you look at the web page and go over the FAQ in the meantime. It should help you better understand the Tiny-Fu project and how it compares to Script-Fu. You could even try using it. :-)

For those of you who don't already know, the Tiny-Fu web page can be found at:
http://www.interlog.com/~kcozens/software/gimp/tiny-fu.html

(And to some others on gimp-devel: Yes, I know I said I would write an e-mail a while back to talk about Tiny-Fu and to "sell" it. I swear its on my ToDo list. Other projects have kept it from getting to the top of the list. I will write something up about this long before GIMP 2.4 is released. Really!)

co-exist as part of the normal build for one release, at least, while scripts get converted? Just a thought...

I started development of Tiny-Fu in a copy of the GIMP source tree. Now I work on it outside the source tree as it is now a separate module. I don't see it getting added to the main tree any time soon and I don't think it should be. Anyone who can build GIMP can download the source for Tiny-Fu, build it, and install it along side Script-Fu. For the Windows users a pre-built binary exists.

I don't have the space available to host pre-built binaries for all the different OS and distro's which can run GIMP but I would be happy to provide pointers on the Tiny-Fu web page to any binaries which someone else builds and makes available for download.

Sven Neumann
2005-01-22 15:31:36 UTC (over 19 years ago)

script-fu documentation

Hi,

on a related note, there's an interesting feature that we should consider to add to Tiny-Fu and, if it stays around, to Script-Fu:

Yesterday, I moved GimpEnumStore and GimpEnumComboBox to libgimpwidgets. GimpEnumComboBox gives you a very easy way to create a combo-box with all possible enum values for a given registered enum. Since all enums used in the PDB are registered with the GType system (since GIMP 2.2), it should be easy to add a new SF-ENUM parameter that scripts can use to allow users to choose an enum value. This could be useful for example in perspective-shadow.scm:

SF-OPTION _"Interpolation" '(_"None" _"Linear" _"Cubic")

would become

SF-ENUM _"Interpolation" "GimpInterpolationType"

The advantage is that it doesn't duplicate the translatable strings and that new interpolation types (such as the Lanczos interpolation routines which have just been added), would automatically show up.

Kevin, would you like to hack on this or should I have a look at it?

For this to work correctly, we will need to move some more enums from libgimp to libgimpbase but that is going to happen over the next days anyway.

Sven

Kevin Cozens
2005-01-23 18:23:23 UTC (over 19 years ago)

script-fu documentation

Campbell Barton wrote:

Script X dosent work with Tiny fu but and VsVercer for other scripts ,...... you know, it just gets messy. Its best top keep to one, newbies will ask which to use and get confusticated answeres by opinionated experts.

Forgetting about Tiny-Fu for a moment there are still problems with the Scheme based scripts. You may not be aware that scripts written for one version of GIMP may not run in a newer version of GIMP due to changes in the PDB interface, or due to enforcement of certain rules or behaviour in GIMP itself. For example, the current version of GIMP requires you to add a layer to an image before you can manipulate its contents. Earlier versions of GIMP had no such restriction. Any script which doesn't add a layer before doing certain operations on it will fail.

Opinionated experts will often give differing and confusing answers to questions regardless of topic. In this case, the answers aren't that complicated or confusing.

The short answer is if a person isn't planning on writing their own scripts, they should use the plug-in which runs the script they want to use. For someone who does plan on writing or modifying scripts, they can use the more well known, but problematic, plug-in known as Script-Fu or they can use the newer, and less tested, plug-in known as Tiny-Fu.

It is much easier to debug scripts when using Tiny-Fu than it is when using Script-Fu. Also, if a person knows Scheme they will find it easier to write scripts for Tiny-Fu since it more closely follows the existing Scheme standards than Script-Fu ever.

(Hmm...the above two paragraphs sound like something I should add to my Tiny-Fu FAQ)

Sounds like tinyfu is better and smalled, grerater development? Why not switch?

Tiny-Fu is better in a number of ways and I'm currently working on one additional change which is of importance to GIMP users whose written language can not be properly displayed using the ASCII character set.

I feel that a switch will be made. It is just a matter of when rather than if. It could happen as early as GIMP 2.4 or it might not happen until much later. There is no deadline or milestone currently set as to when a switch will occur.

PS, Im implying that scripting in the 2 script-fu ansd tiny fu isnt the same, if it is - then maby my arg dosent hold, tho in my expereince implimentations are useually diff.

Tiny-Fu has a set of compatability routines for Script-Fu so writing scripts for Tiny-Fu isn't that different from writing them for Script-Fu. Most Script-Fu scripts can be made to run under Tiny-Fu with few changes. The main difference is that Tiny-Fu requires you to define all your variables (as noted in the Scheme standard documentation) before you use them the first time. There are a few scripts I have run across which require larger changes since they relied on bad behaviour of the Scheme interpreter used in Script-Fu. In one particular instance, the bad behaviour was being able to globally access a variable that was defined locally in a define block.

If new scripts avoid features available in SIOD which are not defined in the Scheme standard document and all variables are defined before first use it will be easier, if not trivial, to make them run using Tiny-Fu.