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

Random Script Tips

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Random Script Tips DJ 25 Jun 01:09
  Random Script Tips Sven Neumann 25 Jun 11:56
DJ
2009-06-25 01:09:28 UTC (over 15 years ago)

Random Script Tips

Hi Gimp-user,

I'm a newbie when it comes to Gimp script writing, and I'm going through the paces to learn. I've come across a couple of items that might help others also in the learning process.

- I've noticed a lot of folks say to restart Gimp after installing their script. Maybe that's the safest/surest thing to do, but there's also Filters > Script-FU > Refresh Scripts (No?).

- Help > Procedure Browser is nice, but I wanted to view in one file, read, do regex searches, and cut/paste. So I ran this command:

gimp --new-instance --no-interface --batch '(gimp-procedural-db-dump "pdb.dump")' --batch '(gimp-quit FALSE)'

- Use constants and enumerations found in pdb. Example, use FOREGROUND-FILL, rather than 0.
(Maybe http://developer.gimp.org/api/2.0/, too?)

- Definitely check out gimp-message, especially if you're having problems. You can always remove them later.

I found these two scripts helpful, in the sense there is a lot of older scripts out there, and these may highlight what's changed, so older scripts aren't used as templates.

* script-update.pl This Perl script reads in a Script-Fu script written for older versions of GIMP and outputs an updated script which contains most (and sometimes all of) the changes needed to make the script runnable in a newer version of GIMP. Scripts as old as ones written for GIMP 1.0 (and possibly older) can be updated for use with versions 2.0, 2.2, or 2.4 of GIMP.

* list-deprecated-pdb.pl This Perl script reads in the output from the PDB dump function of GIMP. It generates a list of deprecated functions and the names of the functions which replace the deprecated ones. http://www.ve3syb.ca/software/gimp/extras.html

Any others?

Sven Neumann
2009-06-25 11:56:24 UTC (over 15 years ago)

Random Script Tips

Hi,

On Wed, 2009-06-24 at 18:09 -0500, DJ wrote:

* list-deprecated-pdb.pl
This Perl script reads in the output from the PDB dump function of GIMP. It generates a list of deprecated functions and the names of the functions which replace the deprecated ones. http://www.ve3syb.ca/software/gimp/extras.html

You can also use the --pdb-compat-mode command-line option of gimp:

--pdb-compat-mode {off|on|warn} If the PDB should provide aliases for deprecated functions.

The mode is 'on' by default, which means that GIMP will silently process deprecated PDB functions. If you change it to 'warn', then GIMP will warn you whenever a script uses a deprecated function. You can also turn it 'off' completely. Then deprecated functions will simply not exist and an error will be raised if you try to call one.

Sven