(02-01-2020, 08:52 AM)rich2005 Wrote: If you ever come across another script like this, then might be (but not always) fixable without a major re-write. A parameter ADDITION-MODE becomes LAYER-MODE-ADDITION, and OVERLAY-MODE becomes LAYER-MODE-OVERLAY ... For a list of modes open up the script-fu console, select a function that handles modes and see the options.
Except that in my Gimp 2.10.14, all these are already defined:
Code:
➤> print ('\n'.join([ x+':'+str(globals()[x]) for x in dir() if 'OVERLAY' in x]))
LAYER_MODE_OVERLAY:23
LAYER_MODE_OVERLAY_LEGACY:5
OVERLAY_MODE:5
(and yes, I checked that this is also the case in Scheme)
And the actual replacement isn't the one you think, to get the same value you would need to use LAYER-MODE-OVERLAY-LEGACY, LAYER-MODE-OVERLAY is actually a new value that corresponds to the new linear-light blend modes. In most scripts it shouldn't matter, but in some it could.
For Scheme scripts there could be a more universal fix: all the scripts run in the same name space (you can have name clashes between scripts) so it should be possible to write a script that initializes all these variables in the common name space. Maybe some Scheme maven can be involved.