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

Script-Fu deprecation warnings - how to handle these?

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.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Script-Fu deprecation warnings - how to handle these? Helmut Jarausch 18 Oct 10:25
  Script-Fu deprecation warnings - how to handle these? Richard 18 Oct 16:55
  Script-Fu deprecation warnings - how to handle these? Jouke Rensma 20 Oct 14:03
  Script-Fu deprecation warnings - how to handle these? Kevin Cozens 23 Oct 02:50
Helmut Jarausch
2015-10-18 10:25:10 UTC (about 9 years ago)

Script-Fu deprecation warnings - how to handle these?

Hi,

from time to time I get deprecation warnings in older script-fu scripts. Like
gimp-selection-load should be replaced by gimp-image-select-item

but gimp-image-select-item always takes 3 parameters while gimp-selection-load had been called with a single parameter.

Is there an upgrade guide for script-fu scripts?

Many thanks for a pointer, Helmut

Richard
2015-10-18 16:55:25 UTC (about 9 years ago)

Script-Fu deprecation warnings - how to handle these?

None that I'm aware of -- docs.gimp.org lists a "Script-Fu Migration Guide" but that is relative to GIMP 2.4 (when GIMP switched script-fu engines) and not up to date with current versions.

In the case of gimp-selection-load specifically, the one parameter is a channel handle and I assume it operates on the 'current' image (which is probably the reason for its deprecation). The three parameters to gimp-image-select-item are:

1 - target image handle 2 - Type of operation to perform on the target image (add/subtract/etc.) 3 - Source item to operate from (layer, channel, etc.)

All these parameters make sense. Your image handle is provided automatically when executing your script, CHANNEL_OP_REPLACE or CHANNEL_OP_ADD is probably what you want to fill in for parameter 2, and parameter 3 can take the channel handle just like the older function.

-- Stratadrake strata_ranger@hotmail.com
--------------------
Numbers may not lie, but neither do they tell the whole truth.

Date: Sun, 18 Oct 2015 12:25:10 +0200 From: jarausch@skynet.be
To: gimp-user-list@gnome.org
Subject: [Gimp-user] Script-Fu deprecation warnings - how to handle these?

Hi,

from time to time I get deprecation warnings in older script-fu scripts. Like
gimp-selection-load should be replaced by gimp-image-select-item

but gimp-image-select-item always takes 3 parameters while gimp-selection-load had been called with a single parameter.

Is there an upgrade guide for script-fu scripts?

Many thanks for a pointer, Helmut

_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list

Jouke Rensma
2015-10-20 14:03:25 UTC (about 9 years ago)

Script-Fu deprecation warnings - how to handle these?

Hi,

Have a look at the builtin procedure browser, to be found in the help menu. You should find both the deprecated and the replacing procedures there. If you have a little programming background, you can adapt the scripts yourself. I did this recently for a few scripts that didn't work correctly in v2.9.1 ("Straighten & Crop" and "Shadow & Highlight").

In 2.9.1 (Partha's version) I found that the python translations are not always working correctly. I haven't figured out what/why on that.

Op 18-10-2015 om 12:25 schreef Helmut Jarausch:

Hi,

from time to time I get deprecation warnings in older script-fu scripts. Like
gimp-selection-load should be replaced by gimp-image-select-item

but gimp-image-select-item always takes 3 parameters while gimp-selection-load had been called with a single parameter.

Is there an upgrade guide for script-fu scripts?

Many thanks for a pointer, Helmut

_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list

Kevin Cozens
2015-10-23 02:50:40 UTC (about 9 years ago)

Script-Fu deprecation warnings - how to handle these?

On 15-10-18 06:25 AM, Helmut Jarausch wrote:

from time to time I get deprecation warnings in older script-fu scripts. Like
gimp-selection-load should be replaced by gimp-image-select-item

but gimp-image-select-item always takes 3 parameters while gimp-selection-load had been called with a single parameter.

Is there an upgrade guide for script-fu scripts?

I am not aware of any formal documentation for dealing with changes in the procedures available to Script-Fu in GIMP between one version of the program and another.

I have a Perl script that can be used to update calls to GIMP procedures in Script-Fu scripts but I haven't updated it in a while. It can handle a lot of the changes but there was one major set of changes in GIMP procedures (between 2.4 and 2.6, IIRC) that were rather extensive and beyond what my script was designed to handle.

I will have to dig out the script and get it updated again some day. I've been working on a number of other projects so I haven't been doing anything related to the GIMP project in some time.

Cheers!

Kevin.

http://www.ve3syb.ca/           |"Nerds make the shiny things that distract
Owner of Elecraft K2 #2172      | the mouth-breathers, and that's why we're
                                 | powerful!"
#include  |             --Chris Hardwick